Jump to content

Archived

This topic is now archived and is closed to further replies.

avo

Counting how many times explode()

Recommended Posts

Hi all

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

example
[quote]$var="one,two,three,four"
$temp=explode ("," ,$var);

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

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

THanks in advance

Share this post


Link to post
Share on other sites
Hi

Sorted it

just

[quote]count($temp);[/quote]

cheera

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.