jmichael68 Posted October 24, 2006 Share Posted October 24, 2006 I'm having some trouble replacing a parenthesis in my string. Here is one variation of what I've already tried.$text = ')FOOTBALL';$numer12 = '';$text = ereg_replace('/)/';, $numer12, $text);Does anyone have a quick fix for my problem?Thanks Quote Link to comment Share on other sites More sharing options...
Caesar Posted October 24, 2006 Share Posted October 24, 2006 [code]<?php $string = ')Football'; $numer12 = ''; $new = str_replace(")",$numer12,$string); echo"$new";?>[/code] Quote Link to comment Share on other sites More sharing options...
jmichael68 Posted October 24, 2006 Author Share Posted October 24, 2006 I get this messageParse error: syntax error, unexpected T_STRING in /webroot/s/u/supfr001/ssl/functions.php on line 895also $string is part of an array. Quote Link to comment Share on other sites More sharing options...
Caesar Posted October 25, 2006 Share Posted October 25, 2006 That code definitely works (one I showed you). I would have to see a bigger sample of your code from the file that's yielding the parse error. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.