₦airaland Forum

Welcome, Guest: Register • Login • With Google • Trending • Recent • New

Stats: 3,345,626 members, 8,518,538 topics. Date: Saturday, 14 November 2026 at 12:08 PM

Toggle theme

[SOLVED] Gurus In The House (PHP Programmers) - Programming - Nairaland

Nairaland Forum › Science/Technology › Programming › [SOLVED] Gurus In The House (PHP Programmers) (1412 Views)

1 Reply (Go Down)

[SOLVED] Gurus In The House (PHP Programmers) by donsheddy1(op):
Can someone put me in the right direction to do this.

I want a for loop to enable me add class to the first image of a slider and here's my code https://codepad.co/snippet/upJHPBsD
Your help is appreciated.
Re: [SOLVED] Gurus In The House (PHP Programmers) by Silverman42(m): 9:39am On Aug 17, 2017
Bro, this is a work for javascript
Re: [SOLVED] Gurus In The House (PHP Programmers) by Olyboy16(m): 9:57am On Aug 17, 2017
donsheddy1:
Can someone put me in the right direction to do this.

I want a for loop to enable me add class to the first image of a slider and here's my code https://codepad.co/snippet/upJHPBsD
Your help is appreciated.
$count = 1;
foreach(<condition>wink{
if($count == 1){
//add your class thingy
++$count;
}
//and everything else
}
.
if you are using a straight for loop
//
for($count=1;<condition>;$count++){
if($count == 1){
//add class
}
//and everything
}
Re: [SOLVED] Gurus In The House (PHP Programmers) by donsheddy1(op): 10:31am On Aug 17, 2017
Did u see how the image is been echoed? I was expecting you to use the code provided to further explain your point thanks
Olyboy16:
$count = 1;
foreach(<condition>wink{
if($count == 1){
//add your class thingy
++$count;
}
//and everything else
}
.
if you are using a straight for loop
//
for($count=1;<condition>;$count++){
if($count == 1){
//add class
}
//and everything
}
Re: [SOLVED] Gurus In The House (PHP Programmers) by Olyboy16(m): 11:37am On Aug 17, 2017
donsheddy1:
Did u see how the image is been echoed? I was expecting you to use the code provided to further explain your point thanks
oh okay, i get it.

i'm sorry bro, bt...i just don't feel like checking that link.
.
if you post the problem snippet here, i'll gladly help you adapt the solution given to it.
Re: [SOLVED] Gurus In The House (PHP Programmers) by donsheddy1(op): 12:07pm On Aug 17, 2017
Olyboy16:
oh okay, i get it.

i'm sorry bro, bt...i just don't feel like checking that link.
.
if you post the problem snippet here, i'll gladly help you adapt the solution given to it.
Thanks for your support. I have fixed it myself
1 Reply

Abuja Php Programmers Where Are You? I Have A Job For You • Need Professional Php Programmers For A Project, Money Involved • PHP Programmers, Pls Step In • 2 • 3 • 4

Advise Pls, Seems Confuse About My Career • Error Detected • Starting A Career As A Software Developer! Beginners Guide