Answers for "display an array"

0

java how to print a string

String[] array = new String[] {"John", "Mary", "Bob"};
System.out.println(Arrays.toString(array)); // [John, Mary, Bob]
Posted by: Guest on January-01-1970
0

display elements of the array

$max=sizeof($_SESSION['cart']);
for($i=0; $i<$max; $i++) { 

while (list ($key, $val) = each ($_SESSION['cart'][$i])) { 
echo "$key -> $val ,"; 
} // inner array while loop
echo "<br>";
} // outer array for loop
Posted by: Guest on October-14-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language