[ale] php weirdness

David Tomaschik david at tuxteam.com
Mon Feb 23 12:57:38 EST 2009


It works for me as intended (-12345).  Can you provide more of the
surrounding code?

David


Jim Kinney wrote:
> Why does
>
> echo str_replace(substr($row['foo'],0,3), '-', $row['foo']);
>
> print out    abc-12345
>
> when $row['foo'] contains abc12345? From what str_replace is SUPPOSED
> to do it should print -12345 instead??
>
> php5.
>
>   


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
Url : http://mail.ale.org/pipermail/ale/attachments/20090223/6473c34b/attachment.bin 


More information about the Ale mailing list