I have this code:
$data[1] = "blablabla";
$data[2] = "blablablabla";
if (strlen($data) < 10)
{
// doing...
}
In this code I want to check all elements from array. How to do it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you want to modify the data, use a reference (add a
&before$element):If you don’t want to use references directly, you can use a standard
forloop with an indexer: