Jump to content

Mathy

Members
  • Posts

    19
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Mathy's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Anyone have any idea of what could be wrong?
  2. Didn't work. My current code: echo ' var sContent=parent.document.getElementById("cont").value.replace("[\\f\\n\\r\\t\\v]", "[NL]"); ';
  3. I am trying to trigger this code: echo ' var sContent=parent.document.getElementById("cont").value.replace("[\f\n\r\t\v]", "[NL]"); '; As you can see, I am trying to make PHP ignore the string within the JavaScript replace function's parameter, so that JavaScript should handle the new lines, and PHP shouldn't. How is this possible?
  4. I solved the problem. Sorry for my attitude, but I had a deadline. Now, where do I mark this thing as resolved? I know that's possible.
  5. I don't see what's wrong with my attitude, pal! Please provide me with an example?
  6. Still doesn't work. The whole code is: $title = $dat['title']; $creator =$dat['creator']; $subject = $dat['subject']; $forum = $dat['forum']; $dat['title'] = str_replace(" ", "-", $title); $dat['creator'] = str_replace(" ", "-", $creator); $dat['subject'] = str_replace(" ", "-", $subject); $dat['forum'] = str_replace(" ", "-", $forum); $data=$dat['title']; echo $data; $Data returns a string with spaces :S
  7. Well yes, that part works, when I print it out, but when I then use $dat['title'] it's not with lines instead of spaces again!
  8. Your code is useless, didn't even try it! Think about it! It will only actually return the last value of the array, not them all.
  9. Nice, I think you at least know what you're doing. Thanks to everyone else that helped so far, BUT! Can you please give an example to this code? I don't believe I am getting it.
  10. That's not your business, when I tell you what the values contain. And yes, I know they contain that, because they all print out normally! However, with spaces and not "-" which it should be doing! The array is being assigned from a SQL database.
  11. $titl=$dat['title']; $crea=$dat['creator']; $subj=$dat['subject']; $foru=$dat['forum']; $tit=str_replace(" ", "-", $titl); $cre=str_replace(" ", "-", $crea); $sub=str_replace(" ", "-", $subj); $for=str_replace(" ", "-", $foru); $dat['title'] contains "Hmmm! Another test!" $dat['creator'] contains "Mathy" $dat['subject'] contains "Yup, testing again!" $dat['forum'] contains "Test forum 1" Why doesn't all the final variables replace the spaces in the text with lines?
×
×
  • 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.