I have uploaded multiple images and path of all the images have been stored together.
Using explode
I have separated them and now I wish to echo them in a c
If you see only one image it means that your explode contains an array with only
one item.
For test replace $array = explode("*", $str); with $array = explode("*", "iamge1.png*iamge2.png");
and you should see two images.
Code:
";
/* Indicators */
echo"";
echo"";
echo"";
echo"";
echo"
";
$sql = "SELECT * FROM register_office WHERE id='".$idd."'";
$result = mysqli_query($con, $sql);
if (mysqli_num_rows($result) > 0)
{
/* Wrapper for slides*/
echo "";
while($row = mysqli_fetch_assoc($result))
{
// $str = $row["offimage"];
$str = "iamge1.png*image2.png";
$array = explode('*', $str);
foreach ($array as $item)
{
echo "";
echo "";
echo "";
echo "";
echo"";
}
echo"";
}
/*Controls*/
echo"";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
}
?>