note 101484 deleted from function.explode by googleguy

From: Date: Thu, 22 Nov 2012 16:55:44 +0000
Subject: note 101484 deleted from function.explode by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-192095@lists.php.net to get a copy of this message
Note Submitter: jamestrowbridge at gmail dot com ---- FYI, use double quotes for the separator parameter: <?php $string = "Hello\nHello\nHello"; $arr = explode('\n',$string);//Using single quotes print_r($arr); /* Returns: Array ( [0] => Hello Hello Hello ) */ ?> Is different than: <?php $string = "Hello\nHello\nHello"; $arr = explode("\n",$string);//Using double quotes print_r($arr); /* Returns: Array ( [0] => Hello [1] => Hello [2] => Hello ) */ ?>

« previous php.notes (#192095) next »