Hi Guys
I have a string eg
"
19/07 07:54 BORDERS : Red-backed Shrike, St. Abbs Head NNR [R]
male at the lighthouse garden and showing well yesterday afternoon (18/07)
19/07 07:56 ABERDEENSHIRE : Grey Phalarope, Loch of Strathbeg RSPB [R]
no sign at Starnafin Farm but adult Mediterranean Gull, 6 Little Gulls, Ruff and 30+ Great Skuas north
19/07 07:58 ANGUS & DUNDEE : Ruddy Shelduck, Montrose Basin [R]
two still at The Lurgies; also 2 Green Sandpipers and 10 Greenshank (18/07)
I want to remove the areas in RED, how can i do it
What i have is a script that watches for an email and breaks the message part ready for uploading to an mysql database for displaying on a website. it works but the bits in red i want to strip out
Any ideas how using PHP i can remove these areas in the large string ?
regards
PHP Help Please, Removing Characters From A String
Subject: PHP Help Please, Removing Characters From A String
Last edited by AndyGpy on Sun 19 Jul, 2009 22:34; edited 1 time in total
Last edited by AndyGpy on Sun 19 Jul, 2009 22:34; edited 1 time in total
Subject: Re: PHP Help Please, Removing Characters From A String
Use str_replace function:
http://it.php.net/manual/en/function.str-replace.php
Or
http://it.php.net/manual/en/function.str-replace.php
Or
- str_ireplace() - Case-insensitive version of str_replace
- substr_replace() - Replace text within a portion of a string
- preg_replace() - Perform a regular expression search and replace
- strtr() - Translate certain characters
Page 1 of 1
You cannot post new topicsYou cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events
This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by Icy Phoenix based on phpBB
Generation Time: 0.0971s (PHP: 17% SQL: 83%)
SQL queries: 11 - Debug Off - GZIP Enabled