6 November 2009, 5:20 PM

This is handy function which i have been using i put it together myself and use it alot to get data out of documents. 

// (c) Ollie Kett 2009

function FindIt($content, $start, $end) {
$haystack = strstr($content, $start);
$r = substr($haystack, 0, strpos($haystack, $end));
$remove = array($start);
$with   = array('');
$output  = str_replace($remove, $write, $r);
return $output;
}



Run in the follow manner for example i will use the below content
$content = 'information'

I would run that like the follow

FindIt($content, '', '');


That will return the result of 
information


You may want to explore your data if you have information such as 10/100. Explode it to like this
//You use FindIt() instead of 10/100
$e = explode("/", "10/100");


This returns the result of
$e[0] -> 10
$e[1] -> 100





We have a large portfolio of work we have completed for clients. Our portfolio always carries our current new iPhone applications. Take a look

Follow us on Twitter, We aim to provide Live Information - @olliekett
 

© OKD Limited 2010 | Contact Us
OKD Limited is a private registered company in England and Wales.
 
Ollie Kett Designs - Tracking System