Jump to content

help with array


malikye

Recommended Posts

i'm trying to learn how to make an array. the user will type in a text box, and i want them to receive a "Yes" or "No" if what they type matches my array. but for some reason, my answer is always "No". here is my code:

 

<?php
$qual=array('html','web','graphic','SQL');
?>

<?php
if ($qualification==$qual)
  echo "Yes";
else
  echo "No";
?>

 

what am i doing wrong?

Link to comment
https://forums.phpfreaks.com/topic/253523-help-with-array/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.