Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,152,815 members, 7,817,365 topics. Date: Saturday, 04 May 2024 at 11:05 AM

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

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

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)

(1) (Reply) (Go Down)

[SOLVED] Gurus In The House (PHP Programmers) by donsheddy1(m): 9:03am On Aug 17, 2017
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(m): 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(m): 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)

Most "Programmers" Here Are Not Programmers / Programming (php/javascript) Interns Are Needed At A Fast Growing ICT Firm / An Error Occurred At Log Record Id.

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 10
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.