This topic contains 0 replies, has 1 voice, and was last updated by VGlushkin 8 years, 2 months ago.
Viewing 1 post (of 1 total)
Viewing 1 post (of 1 total)
You must be logged in to reply to this topic.
This topic contains 0 replies, has 1 voice, and was last updated by VGlushkin 8 years, 2 months ago.
You defined a PHP associative array like this:
$fLen = array (
“ID” => $statement->getColumnMeta ( 0 ) [‘len’]/3,
“LastName” => $statement->getColumnMeta ( 1 ) [‘len’]/3,
“FirstName” => $statement->getColumnMeta ( 2 ) [‘len’]/3,
“Company” => $statement->getColumnMeta ( 3 ) [‘len’]/3,
“SearchType” => $statement->getColumnMeta ( 4 ) [‘len’]/3,
“ActivityCode” => $statement->getColumnMeta ( 5 ) [‘len’]/3,
“Status” => $statement->getColumnMeta ( 6 ) [‘len’]/3,
“AccountNum” => $statement->getColumnMeta ( 7 ) [‘len’]/3,
“DateEntered” => $statement->getColumnMeta ( 8 ) [‘len’]/3,
“DateModified” => $statement->getColumnMeta ( 9 ) [‘len’]/3,
“KeyWords” => $statement->getColumnMeta ( 10 ) [‘len’]/3,
“Remark” => $statement->getColumnMeta ( 11 ) [‘len’]/3,
“PrintForAlex” => $statement->getColumnMeta ( 12 ) [‘len’]/3,
“PrintForLira” => $statement->getColumnMeta ( 13 ) [‘len’]/3,
“ModifiedBy” => $statement->getColumnMeta ( 14 ) [‘len’]/3
);
But now you really would like to access your arra by an int indes instead of the name. Here is how you can do this”
$fLenKeys = array_keys($fLen);
for( $i = 0; $i <= 14; $i++ )
echo (‘ $fLen[$fLenKeys[‘ . $i . ‘]] => ‘ . $fLen[$fLenKeys[$i]] . ‘<br>’);
You can see in the output something like this:
$fLen[$fLenKeys[0]] => 3.3333333333333
$fLen[$fLenKeys[1]] => 32
$fLen[$fLenKeys[2]] => 32
$fLen[$fLenKeys[3]] => 64
$fLen[$fLenKeys[4]] => 16
$fLen[$fLenKeys[5]] => 16
$fLen[$fLenKeys[6]] => 16
$fLen[$fLenKeys[7]] => 32
$fLen[$fLenKeys[8]] => 6.3333333333333
$fLen[$fLenKeys[9]] => 6.3333333333333
$fLen[$fLenKeys[10]] => 64
$fLen[$fLenKeys[11]] => 128
$fLen[$fLenKeys[12]] => 1.3333333333333
$fLen[$fLenKeys[13]] => 1.3333333333333
$fLen[$fLenKeys[14]] => 64
You must be logged in to reply to this topic.
Posted | Modified |
---|---|
Nov 16 | Dec 2 - 14:52 |
2017-11 - From the Editor - Who is My President?... | |
Nov 29 | Nov 26 - 14:21 |
Sat *WARREN* 09:00 - - - Sun *BROWN* 09:00... | |
Nov 26 | Nov 26 - 14:19 |
19 Game Results - 2017-11-26 SU - Diego dropped others - Andres scored 4... | |
Nov 24 | Nov 24 - 18:10 |
Adventures in the Dominican... | |
Oct 11 | Nov 17 - 20:32 |
Home... |
Rani S | Nov 15 |
Nice lesson, thank you for sharing with us :)... | |
Scottgal | Nov 4 |
Всем привет, уже третий день не могу поставить D... | |
useaglefcu.org | Jul 4 |
In MongoDB, is it possible to update the value of ... | |
Andre | Jun 24 |
Works with Server 2016 IIS 10.... |
|
Copyright © 2024
Domain Web Center . All Rights Reserved. Magazine Basic theme designed by Themes by bavotasan.com . Disclaimer | Powered by WordPress and bbPress. | Contact the Editor |