thanks for your responses,
so i understand that this code is using an array, however i havn't really used
arrays as i am a novice php coder.
Should this code be used on the php code for inserting the data into the MySQL
table or is it used when retrieving the data using the select function?
On Sat, 2011-05-07 at 16:01 +0800, Ross Hansen wrote:
thanks for your responses,
so i understand that this code is using an array, however i havn't really
used arrays as i am a novice php coder.
Should this code be used on the php code for inserting the data into the
MySQL table or is it
hello all.
im trying to make a function that fetches all rows in the database and stores
each row (Array) within an array.
so the code is as follows:
public function fetch_all($table_name,$order = DESC){
$array['row'] = array();
I would suggest you print out the array to get a better understanding of the
structure first.
Print_r('PRE');
Print_r($array);
Print_r('PRE');
You can foreach over the $array['row']
Foreach($array['row'] as $key=$values)
{
Echo $values.PHP_EOL;
}
Richard L.
hi,
worked it out, thankyou.
On 7 May 2011, at 16:57, ad...@buskirkgraphics.com wrote:
I would suggest you print out the array to get a better understanding of the
structure first.
Print_r('PRE');
Print_r($array);
Print_r('PRE');
You can foreach over the $array['row']
hey,
some php 101 here guys :)
i want to bold the first name and last name in the code below...
?php global $current_user;
get_currentuserinfo();
echo 'Welcome nbsp;' . $current_user-user_firstname . \n;
echo '' . $current_user-user_lastname . \n;
?
Thanks
Michael
--
PHP
?php global $current_user;
get_currentuserinfo();
echo 'Welcome nbsp;B' . $current_user-user_firstname . /B\n;
echo 'B' . $current_user-user_lastname . /B\n;
?
Richard L. Buskirk
-Original Message-
From: Michael Simiyu [mailto:simiyu.mich...@gmail.com]
Sent:
Hi,
?php global $current_user;
get_currentuserinfo();
echo 'Welcome nbsp;' . b.$current_user-user_firstname . /b.\n;
echo '' b. $current_user-user_lastname . /b.\n;
?
On 7 May 2011, at 18:42, Michael Simiyu wrote:
hey,
some php 101 here guys :)
i want to bold the
Thanks alot...
On May 7, 2011, at 8:39 PM, ad...@buskirkgraphics.com wrote:
?php global $current_user;
get_currentuserinfo();
echo 'Welcome nbsp;B' . $current_user-user_firstname . /
B\n;
echo 'B' . $current_user-user_lastname . /B\n;
?
--
PHP General Mailing List
After doing further reading on google i have managed to get this working using
the nl2br php command.
if anyone else wants to know how i did this.
almost the same as what was mentioned in this thread however my rows were being
displayed using while command.
echo nl2br($row['colname']);
On 07 May 2011 at 18:42, Michael Simiyu simiyu.mich...@gmail.com wrote:
hey,
straw.
some php 101 here guys :)
i want to bold the first name and last name in the code below...
It's not PHP 101, it's HTML 101.
tim
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
11 matches
Mail list logo