Hey bud, Well from printing out the entire contents of the html array, you can see that the Release date is the 3rd row down.
$i=0;
$x=0;
while(isset($html[$i]))
{
echo $html[$i];
$i++;
}
Director: Gary Winick
Writers: Jose Rivera, Tim Sullivan
[B]Release Date: 9 June 2010 (UK) [/B]
Taglines: What if you had a second chance to find true love? See more » ..................
..................
This means that the line you want is located in array position 2. As the array starts from 0 and counts up. So it would be:
$html[0] = Director: Gary Winick
$html[1] = Writers: Jose Rivera, Tim Sullivan
$html[2] = Release Date: 9 June 2010 (UK)
$html[3] = Taglines: What if you had a second chance to find true love? See more
So the easy solution would be to simply echo out position 2.
echo $html[2];
However, if the Release date from a different imdb page was put into a different array position, this wouldn't work. So the most precise and dynamic way of doing this would be to create a regular expression to check what each array value contains before deciding whether or not to print it out. (This is something I've just started to learn as well, so it's probably not the most efficient way of doing it, but hey - if it ain't broke don't fix it!)
<?php
// produce the release date of film
$some_link = 'http://www.imdb.com/title/tt0892318/';
$tagName = 'div';
$attrName = 'class';
$attrValue = 'txt-block';
$subtag = 'h4'; …