How to declare an array in php?

Array  declare in php

Team Leader Asked on February 11, 2017 in PHP.
Add Comment
1 Answer(s)

In PHP, the array() function is used to create an array:


<?php

$tech=array("JAVA","C","PHP");

echo "I know " . $tech[0] . ", " . $tech[1] . " and " . $tech[2] . ".";

?>

Team Leader Answered on March 19, 2017.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.