PHP 7 Script to Check if Variable is an Array or Not in Browser Full Project For Beginners

  • Post author:
  • Post category:PHP
  • Post comments:0 Comments

 

Welcome folks today in this blog post we will be checking if variable is an array or not in browser using php 7. All the full source code of the application is shown below.

 

 

 

Get Started

 

 

 

In order to get started you need to make an index.php file and copy paste the following code

See also  PHP 7 ImageMagick API Example to Convert PDF To PNG/JPEG Image in Browser Full Project For Beginners

 

 

index.php

 

 

<?php 

$arr = array(
  "red",
  "blue",
  "green",
  "pink",
);


if (is_array($arr))
{
  echo "This is an array";
} else {
  echo "This is not an array";
}

?>

Leave a Reply