Jump to content


Photo

Counting how many times explode()


  • Please log in to reply
1 reply to this topic

#1 avo

avo
  • Members
  • PipPipPip
  • Advanced Member
  • 148 posts
  • Locationstaffordshire uk

Posted 02 July 2006 - 09:01 PM

Hi all

How can i count the amount of splits the explode() function as made

example

$var="one,two,three,four"
$temp=explode ("," ,$var);

echo $temp[1];
echo $temp[2];
echo $temp[3];
echo $temp[4];


now we know it as split four times but how can i count this please.

THanks in advance
Im loving it ........

#2 avo

avo
  • Members
  • PipPipPip
  • Advanced Member
  • 148 posts
  • Locationstaffordshire uk

Posted 02 July 2006 - 09:10 PM

Hi

Sorted it

just

count($temp);


cheera
Im loving it ........




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users