I should have been clearer. I am taking the text string from another page using :
$content = file_get_contents('http://www.......);
I have then (somehow
http://ubuntuforums.org/images/smilies/icon_smile.gif ) managed to get the text string I want using :
$start_pointer = strpos($content, '<ol id="summaries"');
$end_pointer = strpos($content, '</ol>', $start_pointer);
$properties_content_length = $end_pointer - $start_pointer;
$properties = substr($content, $start_pointer, $properties_content_length);
$property_list = explode('<li class="regular',$properties);
$property_nbr = count($property_list);
echo '<li class="';
echo strip_tags($property_list[ rand(1, $property_nbr)-1], '<p><img><li><span><div><h2>');
This works fine, except that I want to limit the "echo $property_list" to a certain word eg the "More" in my string below.
" Large and luxurious 5th floor 2 bed furnished apartment in a fantastic historic building close to the City Centre and Waterfront.
More details and 8 photos
Save property
Contact agent "
How and where do I explode again?
Thanks