John Davidson

php - If all is OK echo ok but if one of all is not echo not ok

0 comments
Message:


for example I will write
$data = [ok,ok,ok,ok,ok]
I would like to echo "ok"


but if
$data = [ok,ok,ok,not,ok]
I would like to echo "not ok"


I need help.



My Answer:
ok

$data = ['ok','ok','ok','ok','not ok']

I would like to echo

not ok

Rate this post

3 of 5 based on 9222 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us