I made an array of data that has stored rows from my database, i need to check if the array contains a specific word from it, so i made
if($data_posts[0] == 'Payday') return echo 'this is a payday.';
But i am kinda struggling on this one since i am not an advanced PHP developer. Could someone enlighten me and show me how could i move on this?
Also tried, but with no success.
if($data_posts[0] == "Payday"){ // if the array contains the word payday.
echo'This is a payday.';
}else{ // if not
echo'This is not a payday.';
}