lundi 10 mai 2021

How do I output if there is data in the array?

I have an array like this in PHP:

$myarray = ['mango','jackfruit','litchi','apple','banana'];

I want, if there is 'litchi' in the array data then it will show "This is litchi". But, how to do it?

Aucun commentaire:

Enregistrer un commentaire