To print exploded array

How to print this exploded array in different three boxes?

You can not have dot (.) or hyphen (-) in the variable name which you are passing to the explode function.

Maybe you are trying to do something like this:

$vender = "Vender Name,$100,xyz";
$ven = explode(',', $vender);
var_dump($ven); // Numerically indexed array holdind the data


array (size=3)
  0 => string 'Vender Name' (length=11)
  1 => string '$100' (length=4)
  2 => string 'xyz' (length=3)

Or this

$vender = "Vender Name,$100,xyz";
list($name, $price, $delivery) = explode(',', $vender);
echo 'Name: ' . $name . ' Price: ' . $price . ' Delivery:' . $delivery;


Name: Vender Name Price: $100 Delivery:xyz

Ok Thanku… @TeNDoLLA

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.