Jump to content

toulee_moua

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

toulee_moua's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. What i'm trying to do is replace all "(" to "<" and ")" to ">", like "(TEST)" to "<TEST>", then display them as text.
  2. Thank folks, for responding. Here is what I get: $word = "(test)"; $word = str_replace(array("(", ")"), array("<", ">"), $word); echo $word; //OUTPUT: echo htmlentities($word); // OUTPUT: <test> Is there a way to treat the <> normal characters?
  3. Please help. I am trying to replace parenthesises () in a string with <>. I tried preg_replace and str_replace, but was not success. Here is what I have for str_replace: $word = "(test)"; $word = str_replace('(', '<', $word); $word = str_replace(array('(', ')'), array('<','>'), $word);
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.