[PHP] help with an array if its possible!

2011-06-22 Thread Adam Preece
possible :-/. i hope this makes sense. i'm truly stuck! kind regards Adam Preece -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] advice on how to build this array from an array.

2011-06-07 Thread Adam Preece
hi all, please forgive me if i do not make sense, ill try my best to explain. i have this array or arrays. Array ( [name] = super duplex stainless steels [id] = 30 [page_cat_id] = 10 [main_nav] = true [cat_name] = material range ) Array ( [name] = standard stainless steels [id] = 31

Re: [PHP] advice on how to build this array from an array.

2011-06-07 Thread Adam Preece
hi, thanks for your reply. i have figured out, well kind of, and got the data i need but the problem is its nested within to many arrays! Array ( [threads form types] = Array ( [0] = Array ( [name] = imperial thread form [id] = 28 [page_cat_id] = 9 [main_nav] = true

[PHP] building a key value pair dynamically

2011-06-01 Thread Adam Preece
hi all, is it possible to dynamically build a key value pair array in php from a database result? if so how? kind regards Adam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] building a key value pair dynamically

2011-06-01 Thread Adam Preece
wrote: with mysql use mysql_fetch_assoc, is that what you are asking for ? On 1 June 2011 16:31, Adam Preece a...@blueyonder.co.uk wrote: hi all, is it possible to dynamically build a key value pair array in php from a database result? if so how? kind regards Adam -- PHP General

[PHP] accessing data from an array within an array.

2011-05-07 Thread Adam Preece
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();

Re: [PHP] accessing data from an array within an array.

2011-05-07 Thread Adam Preece
($array['row'] as $key=$values) { Echo $values.PHP_EOL; } Richard L. Buskirk -Original Message- From: Adam Preece [mailto:a...@blueyonder.co.uk] Sent: Saturday, May 07, 2011 11:37 AM To: php-general@lists.php.net Subject: [PHP] accessing data

Re: [PHP] Bold links

2011-05-07 Thread Adam Preece
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

Re: [PHP] what would be the best way to build a 'add page function' to my cms?

2011-05-04 Thread Adam Preece
:19 PM +0100 5/2/11, Adam Preece wrote: the reason, why i don't want to use word press and any other open source solution, is that i want to learn how it is all done. im sure i can figure it out myself but i would like to ask others and see how they would tackle it. the idea

Re: [PHP] make links

2011-05-02 Thread Adam Preece
hi, then use this. ?php if (current_user_can('level_10')) : ? ?php print a href=\http://www.google.com\; target=\_self\My Link/a; ? ?php elseif (current_user_can('level_6')) : ? ?php print read and comment only; ? ?php else : ? ?php print you gotta log-in to see the goodies; ? ?php

[PHP] what would be the best way to build a 'add page function' to my cms?

2011-05-02 Thread Adam Preece
Hi, im building a cms and im currently thinking of a way to build an add page function. any one got some ideas on the best way to achieve this? cheers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] what would be the best way to build a 'add page function' to my cms?

2011-05-02 Thread Adam Preece
. if you have the time could you please tell me more how i could achieve a modular template system? cheers On 2 May 2011, at 18:52, Ashley Sheridan wrote: On Mon, 2011-05-02 at 18:43 +0100, Adam Preece wrote: Hi, sure i will try to be more specific. Is each page a standalone one based