Solved

PHP versions of a line

Posted on 2007-03-21
2
185 Views
Last Modified: 2012-05-05
What is the php version of this line?

 for $i = LBound($NormalRecords,2) to UBound($NormalRecords,2) {
0
Comment
Question by:pingeyeg
2 Comments
 
LVL 49

Accepted Solution

by:
Roonaan earned 125 total points
Comment Utility
I think you can use foreach. I am not sure what the ,2 means in ASP though.

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

-r-
0
 
LVL 14

Assisted Solution

by:ygoutham
ygoutham earned 125 total points
Comment Utility
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
for($i=0;$i<$counter;$i++){

echo "$i  ".  $NormalRecords[2] . "is the third element<br>";
}
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Introduction Many web sites contain image galleries; a common design for these galleries includes a page with a collection of thumbnail images.  You can click on each of the thumbnail images to see the larger version of the image.  This is easily i…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now