note 60558 added to function.explode
| From: | STaRDoGGCHaMP at osu1 dot php dot net | Date: | Wed, 11 Jan 2006 03:07:18 +0000 |
| Subject: | note 60558 added to function.explode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-101526@lists.php.net to get a copy of this message | ||
Following code:
<?php
$string = "12345678";
$explode = explode("5",$string);
for($i = 0; $i <= strlen($string); $i++){
if(isset($explode[$i])){
echo "The variable \$explode[$i] exists! <br>";
echo $explode[$i] . "<br><br>";
}
else{
echo "The variable \$explode[$i] doesn't exist!<br><br>";
}
}
?>
produce this output:
The variable $explode[0] exists!
1234
The variable $explode[1] exists!
678
The variable $explode[2] doesn't exist!
The variable $explode[3] doesn't exist!
The variable $explode[4] doesn't exist!
The variable $explode[5] doesn't exist!
The variable $explode[6] doesn't exist!
The variable $explode[7] doesn't exist!
The variable $explode[8] doesn't exist!
----
Manual Page -- http://www.php.net/manual/en/function.explode.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+60558
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+60558&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+60558&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+60558&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+60558&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+60558&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+60558&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+60558&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+60558&report=yes
Search -- http://master.php.net/manage/user-notes.php