₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,991 members, 8,424,467 topics. Date: Thursday, 11 June 2026 at 08:54 AM

Toggle theme

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

Nairaland ForumScience/TechnologyProgramming[SOLVED] Gurus In The House (PHP Programmers) (1383 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 YouNeed Professional Php Programmers For A Project, Money InvolvedPHP Programmers, Pls Step In234

Computer Programmer With A Degree In Computer Science Education?I Can't Open The ProjectBest Mobile Banking App Development Services In India - Android Developer