News:

AbanteCart v1.4.2 is released.

Main Menu

Have you ever output a $form array?

Started by dhigz, August 02, 2016, 01:40:40 AM

Previous topic - Next topic

dhigz

Have you ever output a form array? (print_r(array_values($form))) I did. It's huge as every element has the entire registry in the array.

If you want to try it, be careful as it will eat up your memory. Make a form with one form element just to see.

So AbanteCart gurus, can you tell me why every form element includes the entire registry as one of it's array values? There must be some valid reason to have all of this overhead every time you output a form.

Don
Don Higbee

abolabo

every form field element is an object, not array!
Do output it use type casting. for ex. var_dump( (string) $form['fields']['some_field_name']));

"No one is useless in this world who lightens the burdens of another."
― Charles Dickens

Forum Rules Code of conduct
AbanteCart.com 2010 -