note 125958 added to function.explode

From: Date: Wed, 24 Mar 2021 14:20:11 +0000
Subject: note 125958 added to function.explode
Groups: php.notes 
Request: Send a blank email to php-notes+get-219152@lists.php.net to get a copy of this message
$string = "PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION"; $exploded = explode("::",$string); /* explode('::',$string) = eliminate every :: and for each division of ::make an array element Example: PDO::ERRMODE_EXCEPTION (exploded) = array ( [0] => string PDO [1] => string ERRMODE_EXCEPTION ) Example: $exploded[0] = "PDO"; */ foreach ($exploded as $index) { echo $index . "\n"; } /* Output: PDO ATTR_ERRMODE => PDO ERRMODE_EXCEPTION */ ---- Server IP: 45.112.84.4 Probable Submitter: 45.112.85.242 (proxied: 2806:107e:13:8bfa:dcfe:a4fc:f6f3:56d) ---- Manual Page -- http://php.net/manual/en/function.explode.php Edit -- https://master.php.net/note/edit/125958 Del: integrated -- https://master.php.net/note/delete/125958/integrated Del: useless -- https://master.php.net/note/delete/125958/useless Del: bad code -- https://master.php.net/note/delete/125958/bad+code Del: spam -- https://master.php.net/note/delete/125958/spam Del: non-english -- https://master.php.net/note/delete/125958/non-english Del: in docs -- https://master.php.net/note/delete/125958/in+docs Del: other reasons-- https://master.php.net/note/delete/125958 Reject -- https://master.php.net/note/reject/125958 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#219152) next »