PHP versions of a line

What is the php version of this line?

 for $i = LBound($NormalRecords,2) to UBound($NormalRecords,2) {
Who is Participating?
RoonaanConnect With a Mentor Commented:
I think you can use foreach. I am not sure what the ,2 means in ASP though.

foreach($NormalRecords as $key => $value) {

ygouthamConnect With a Mentor Commented:
i am assuming the following.

$NormalRecords is an array with n elements.  You want to access the third element (counting starts with 0)

$counter = count($NormalRecords);
echo "Sno  Record Value is the third element";
//just giving the echo logic in the next statement

echo "$i  ".  $NormalRecords[2] . "is the third element<br>";
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.