note 107866 added to function.explode
| From: | alibalouch | Date: | Sun, 11 Mar 2012 19:00:02 +0000 |
| Subject: | note 107866 added to function.explode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-186599@lists.php.net to get a copy of this message | ||
exploding string.......
<?php
//(,'')
$array2 = array();
$string2 = "this is a car";
$whitspace = " ";
$increment=0;
$length = strlen($string2);
for($i=1;$i<$length;$i++){
$char = substr($string2,$i,1);
if($whitspace == $char){
$increment++;
}
elseif($whitspace==""){
$array2[$increment].= $char;
$increment++;
}else{
$array2[$increment].= $char;
}
}
var_dump($array2);
?>
----
Server IP: 69.147.83.197
Probable Submitter: 182.182.29.254
----
Manual Page -- http://www.php.net/manual/en/function.explode.php
Edit -- https://master.php.net/note/edit/107866
Del: integrated -- https://master.php.net/note/delete/107866/integrated
Del: useless -- https://master.php.net/note/delete/107866/useless
Del: bad code -- https://master.php.net/note/delete/107866/bad+code
Del: spam -- https://master.php.net/note/delete/107866/spam
Del: non-english -- https://master.php.net/note/delete/107866/non-english
Del: in docs -- https://master.php.net/note/delete/107866/in+docs
Del: other reasons-- https://master.php.net/note/delete/107866
Reject -- https://master.php.net/note/reject/107866
Search -- https://master.php.net/manage/user-notes.php