API Test: Quotable -> SC 11488 (PHP Array – Test)
“{“
{
Gi Branding API Data Tests -> SC 11531 (PHP Array)
1. Targetting Array Items
text : Arraycolours : Arrayimages : Arraydark :
2. Single Targeted Array Item
#5ABDF9
Array
3. Add Targetted Array Items to new HTML Table using PHP
text | colours | images | dark |
---|---|---|---|
textArray | coloursArray | imagesArray | dark |
PHP ARRAY DATA TESTS -> SC 11629
Note that ARRAYS do NOT need decoding, and will not work if they are decoded.
Print Arrays
Basic Example:
Array ( [0] => Volvo [1] => BMW [2] => Toyota )
API Example:
Array ( [text] => Array ( ) [colours] => Array ( [primaryBackground] => #5ABDF9 [primaryLight] => #ECF0F3 [primaryText] => #0670B1 ) [images] => Array ( [avatar] => https://platformcdn.staging.growthinvest.com/branding/b7c0ee5d-c760-4c3c-9959-15ed4a94ebdf/default_avatar.svg?Expires=1729256320&Signature=Sh2J7w5vF5ES7u9Ib1oYBBQgY4NKq4dY1Z313K0IJO-7NpqLqW3B1qaq3gnT1s1SKGg-LmGvoS7IGiZGAM4QBTDr2or8MsqFuAjKGSusnfkQG~DgkczMwGSLWEZGM2vM6EAqnyCA8UHdGTkbapj6ktatOsC8ufPl0BIKHs7M7bmBVH3HxQGBdEGchkrXJhi5NBtUj6dRn1axREMeGI91rbxvRYyHEFh3jVFTyeBcU96aCmgwugz5nObXzBsE6CvFe7IN5B3zM3tq8Nl4DA7Ijf5yP-r7xb2Qc5zuHdQNMOSOn42HdfGjisBDqjncBhrXYSO18~fkYqID3mlu6x7oOg__&Key-Pair-Id=K1UT3NAZQUV8HI [background] => https://platformcdn.staging.growthinvest.com/branding/b7c0ee5d-c760-4c3c-9959-15ed4a94ebdf/fbb466e82d3b41008ef4fc5e6d81474c-0522626aee9c4934b905af060ff37ada.jpg?Expires=1729256320&Signature=EwEKuksx4IEXI8qmGJlgn~AXb75wAnQArKoY099tQPJyjR9ccUxPDfOpMCOGu8bhY9SxwaP5ORhABWwohG4F0CGQP~2NUn4Wll~M2fUz061G-bhQAR7pCnse~7cy4l9eRNvDdTKDFSRm3eAt-tMWlgEF71Hnp9Wlactr0ixgQYMFo6ytdp5YuzLKp7JNcl61~Ei9qlqdXEDVy~ZvxbibY3PgT2aNmJ1bhMOgEwxOBRbzdfC~KFwvEs2T9xf110vaA1fp2sbpHtnIIezJom9KXegeBpsi6ZSsnDnxyN45tLKmYItT~2R9hgd9pxGuMAIXyPWMzM43XymE0afDV2wx-g__&Key-Pair-Id=K1UT3NAZQUV8HI [favicon] => https://platformcdn.staging.growthinvest.com/branding/b7c0ee5d-c760-4c3c-9959-15ed4a94ebdf/247c510e9630406e98e981050120a418-ffe254cf136845e487257bd8c45fa3ab.png?Expires=1729256320&Signature=antoNXEZuManh6lttxfQL~n1ywDUk2~r3nwkCpyUl~ZN3zA0baexhGIlNjRnEJA420~Q3Az6UeuCBeXzq1corsuu-r8Xs1mOym0~F700El7~DrOTiND4g1VULDfRsVySOZ-R1XPFyZT3Fu00vDmgs7NFZUFbyLjULWYDJhvzgKdBzGsvwETxLq2HzQtqj2UtpWtcoJL~Lio2wBhpzjR8PlCitnqoGvNfUtEihUK8yRTBqXJcsG2zp9nLTgjOoI3n5CSRPoju-ktsgfVkkVaLvCCIinpwWfWK-2iz7DxNHCdB1vnRBz4o01qxiVpfvguDrKo8JK1gpE~BD0XohZI86g__&Key-Pair-Id=K1UT3NAZQUV8HI [logo] => https://platformcdn.staging.growthinvest.com/branding/b7c0ee5d-c760-4c3c-9959-15ed4a94ebdf/20f5ab6d-34fa-412b-98fd-7197f1f60d3d.svg?Expires=1729256320&Signature=EUggYHKZEYnD-5k8O~McZT0qNsNvtuC8fSROpr90LKQNZzStxvKbfeNH8uerdtYe64Lr7bkmIgDqRWNWENGCRSp5zeHS3MtD8L0g5up7Keu6xtxjDU-5Ws~OE0zmtJrDbKFi00EvmIeSDjwWOJ-ZFCfbHuoV9JLyLO6iOIpEwbEBWa6T~RGHVqyjYo4m-lfsyRkAnHc1wbR33HMJD3ZM4aHSTJuYZ9YCDUgMIbb0xg6LNFnGpy3qaZQ1No61CAJQoiiJwyObW51Fv-rFr-c07TbDxOrM33csnAePBoY5J4d1GW0I1gQYMjHFg2pvi0HY8Xnu-Bgim2m7rwVCiVDrCw__&Key-Pair-Id=K1UT3NAZQUV8HI ) [dark] => )
============
Echoing Arrays
Basic Example:
Array
API Example:
Array
============
For Loop Through Arrays
Basic Example:
Volvo
BMW
Toyota
API Example:
If nothing here then the method needs adapting for array type used (jagged?)
============
ForEach Loop Through Arrays
Basic Example:
0 is Volvo
1 is BMW
2 is Toyota
API Example:
text is Array
colours is Array
images is Array
dark is
============
DECODED TESTS START
Print DECODED Arrays – does not work so do not decode!
Echoing DECODED Arrays – does not work so do not decode!
For Loop DECODED – does not work so do not decode!
Manipulation of Multi-Dimensional PHP Array
ForEach Example of hard-coded multi-dimensional test PHP array
Trying to adapt a forEach loop for our decoded API multi-dimensional PHP array !!!!!!!!!!!
NEW BIT
#ECF0F3END NEW BIT
# 1# 2
primaryBackground: #5ABDF9
primaryLight: #ECF0F3
primaryText: #0670B1
# 3 primaryText#0670B1
avatar: https://platformcdn.staging.growthinvest.com/branding/b7c0ee5d-c760-4c3c-9959-15ed4a94ebdf/default_avatar.svg?Expires=1729256320&Signature=Sh2J7w5vF5ES7u9Ib1oYBBQgY4NKq4dY1Z313K0IJO-7NpqLqW3B1qaq3gnT1s1SKGg-LmGvoS7IGiZGAM4QBTDr2or8MsqFuAjKGSusnfkQG~DgkczMwGSLWEZGM2vM6EAqnyCA8UHdGTkbapj6ktatOsC8ufPl0BIKHs7M7bmBVH3HxQGBdEGchkrXJhi5NBtUj6dRn1axREMeGI91rbxvRYyHEFh3jVFTyeBcU96aCmgwugz5nObXzBsE6CvFe7IN5B3zM3tq8Nl4DA7Ijf5yP-r7xb2Qc5zuHdQNMOSOn42HdfGjisBDqjncBhrXYSO18~fkYqID3mlu6x7oOg__&Key-Pair-Id=K1UT3NAZQUV8HI
background: https://platformcdn.staging.growthinvest.com/branding/b7c0ee5d-c760-4c3c-9959-15ed4a94ebdf/fbb466e82d3b41008ef4fc5e6d81474c-0522626aee9c4934b905af060ff37ada.jpg?Expires=1729256320&Signature=EwEKuksx4IEXI8qmGJlgn~AXb75wAnQArKoY099tQPJyjR9ccUxPDfOpMCOGu8bhY9SxwaP5ORhABWwohG4F0CGQP~2NUn4Wll~M2fUz061G-bhQAR7pCnse~7cy4l9eRNvDdTKDFSRm3eAt-tMWlgEF71Hnp9Wlactr0ixgQYMFo6ytdp5YuzLKp7JNcl61~Ei9qlqdXEDVy~ZvxbibY3PgT2aNmJ1bhMOgEwxOBRbzdfC~KFwvEs2T9xf110vaA1fp2sbpHtnIIezJom9KXegeBpsi6ZSsnDnxyN45tLKmYItT~2R9hgd9pxGuMAIXyPWMzM43XymE0afDV2wx-g__&Key-Pair-Id=K1UT3NAZQUV8HI
favicon: https://platformcdn.staging.growthinvest.com/branding/b7c0ee5d-c760-4c3c-9959-15ed4a94ebdf/247c510e9630406e98e981050120a418-ffe254cf136845e487257bd8c45fa3ab.png?Expires=1729256320&Signature=antoNXEZuManh6lttxfQL~n1ywDUk2~r3nwkCpyUl~ZN3zA0baexhGIlNjRnEJA420~Q3Az6UeuCBeXzq1corsuu-r8Xs1mOym0~F700El7~DrOTiND4g1VULDfRsVySOZ-R1XPFyZT3Fu00vDmgs7NFZUFbyLjULWYDJhvzgKdBzGsvwETxLq2HzQtqj2UtpWtcoJL~Lio2wBhpzjR8PlCitnqoGvNfUtEihUK8yRTBqXJcsG2zp9nLTgjOoI3n5CSRPoju-ktsgfVkkVaLvCCIinpwWfWK-2iz7DxNHCdB1vnRBz4o01qxiVpfvguDrKo8JK1gpE~BD0XohZI86g__&Key-Pair-Id=K1UT3NAZQUV8HI
logo: https://platformcdn.staging.growthinvest.com/branding/b7c0ee5d-c760-4c3c-9959-15ed4a94ebdf/20f5ab6d-34fa-412b-98fd-7197f1f60d3d.svg?Expires=1729256320&Signature=EUggYHKZEYnD-5k8O~McZT0qNsNvtuC8fSROpr90LKQNZzStxvKbfeNH8uerdtYe64Lr7bkmIgDqRWNWENGCRSp5zeHS3MtD8L0g5up7Keu6xtxjDU-5Ws~OE0zmtJrDbKFi00EvmIeSDjwWOJ-ZFCfbHuoV9JLyLO6iOIpEwbEBWa6T~RGHVqyjYo4m-lfsyRkAnHc1wbR33HMJD3ZM4aHSTJuYZ9YCDUgMIbb0xg6LNFnGpy3qaZQ1No61CAJQoiiJwyObW51Fv-rFr-c07TbDxOrM33csnAePBoY5J4d1GW0I1gQYMjHFg2pvi0HY8Xnu-Bgim2m7rwVCiVDrCw__&Key-Pair-Id=K1UT3NAZQUV8HI
# 4 logohttps://platformcdn.staging.growthinvest.com/branding/b7c0ee5d-c760-4c3c-9959-15ed4a94ebdf/20f5ab6d-34fa-412b-98fd-7197f1f60d3d.svg?Expires=1729256320&Signature=EUggYHKZEYnD-5k8O~McZT0qNsNvtuC8fSROpr90LKQNZzStxvKbfeNH8uerdtYe64Lr7bkmIgDqRWNWENGCRSp5zeHS3MtD8L0g5up7Keu6xtxjDU-5Ws~OE0zmtJrDbKFi00EvmIeSDjwWOJ-ZFCfbHuoV9JLyLO6iOIpEwbEBWa6T~RGHVqyjYo4m-lfsyRkAnHc1wbR33HMJD3ZM4aHSTJuYZ9YCDUgMIbb0xg6LNFnGpy3qaZQ1No61CAJQoiiJwyObW51Fv-rFr-c07TbDxOrM33csnAePBoY5J4d1GW0I1gQYMjHFg2pvi0HY8Xnu-Bgim2m7rwVCiVDrCw__&Key-Pair-Id=K1UT3NAZQUV8HI