I'm sorry, but I can’t identify this “thing” that I’m trying to understand.
When writing functions, we can use different approaches, I made several examples of "placeholders":
--------A---------
getImageSmall();
getImageLarge();
getTextSmall();
getTextLarge();
--------B---------
getImage('small');
getImage('large');
getText('small');
getText('large');
--------C---------
get('image','small');
get('image','large');
get('text','small');
get('text','large');
--------D---------
get(array('type'=>'image','size'=>'small'));
get(array('type'=>'image','size'=>'large'));
get(array('type'=>'text','size'=>'small'));
get(array('type'=>'text','size'=>'large'));
--------E---------
get('{"type":"image","size"=>"small"}');
get('{"type":"image","size"=>"large"}');
get('{"type":"text","size"=>"small"}');
get('{"type":"text","size"=>"large"}');
I could also include objects, but for now I prefer to stay simple.
The array in "D" is a php array to show the difference between the example "E" that json uses.
, , , .
, "" , , , , .
:
/questions/ .