note 115308 added to function.str-replace
| From: | detroit303 at microsoft dot com | Date: | Thu, 03 Jul 2014 11:30:10 +0000 |
| Subject: | note 115308 added to function.str-replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-199823@lists.php.net to get a copy of this message | ||
Maybe obvious to veteran PHP programmers but less so to novice PHP programmers is the fact that this
is invalid:
<?php
str_replace($search, $replace, $subject, 1);
?>
At a glance it appears to be a reasonable request, until you realize that the fourth parameter must
be a variable in order to be passed as a reference.
A replacement:
<?php
str_replace($search, $replace, $subject, $temp = 1);
// or
$temp = 1;
str_replace($search, $replace, $subject, $temp);
?>
_____
http://coralclub24.com/coral-club-product/programma-2-kolo-vada-plyus/
----
Server IP: 72.52.91.14
Probable Submitter: 178.136.203.63
----
Manual Page -- http://php.net/manual/en/function.str-replace.php
Edit -- https://master.php.net/note/edit/115308
Del: integrated -- https://master.php.net/note/delete/115308/integrated
Del: useless -- https://master.php.net/note/delete/115308/useless
Del: bad code -- https://master.php.net/note/delete/115308/bad+code
Del: spam -- https://master.php.net/note/delete/115308/spam
Del: non-english -- https://master.php.net/note/delete/115308/non-english
Del: in docs -- https://master.php.net/note/delete/115308/in+docs
Del: other reasons-- https://master.php.net/note/delete/115308
Reject -- https://master.php.net/note/reject/115308
Search -- https://master.php.net/manage/user-notes.php