I am reading an xml file with:
<imageref>image1.jpg|image2.jpg|image3.jpg|image4.jpg</imageref>
<hotelname>villa test</hotelname>
foreach ($filtered as $hotel) {
$xmlhotels[] = array(
'image'=>(string)$hotel->imageref,
'villaname'=>(string)$hotel->hotelname
);
}
When I echo the villaname foreach value I get it.
foreach ($myhotels as $villa) {
echo"",$villa['villaname'],""; }
How can I echo just the first image (image1.jpg) from the xml file.