Jump to content


Photo

removing data from string


  • Please log in to reply
2 replies to this topic

#1 taith

taith
  • Members
  • PipPipPip
  • Advanced Member
  • 1,514 posts
  • LocationCanada

Posted 19 May 2006 - 05:37 PM

hey,
i'm just wanting a simple code which can take a string, and if theres a <? or ?> or " in it, to remove it or change it
90% of computer issues exist between the seat, and the keyboard.

#2 craygo

craygo
  • Staff Alumni
  • Advanced Member
  • 1,973 posts
  • LocationRhode Island

Posted 19 May 2006 - 05:41 PM

preg_replace should do the job for ya.

read the manual

[a href=\"http://www.php.net/manual/en/function.preg-replace.php\" target=\"_blank\"]http://www.php.net/manual/en/function.preg-replace.php[/a]

Ray

#3 freddykhalid

freddykhalid
  • Members
  • PipPip
  • Member
  • 15 posts

Posted 22 May 2006 - 06:51 PM

Talking about the preg_grep topic...
I cannot seem to understand the examples about this command..

Can I ask that someone write a simple code to search (grep) a string within a text file and print it out on the screen pls????

Help is needed!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users