12
I have an array $product_urls containing 200 elements.
Problem: When I do a print_r($product_urls), PHP prints out an array containing 150 elements, and the output appears to be truncated because its missing the closing ). I checked the HTML source code generated and it is indeed truncated at the 150th element. count($product_urls) gives 200.
This is puzzling. I'm using a PHP framework called Laravel. Any ideas?
PHP Code
echo "<pre>";
echo count($product_urls);
print_r($product_urls);
Output
200Array
(
[0] => http://www.example.com/mysite/mysite-Vest-With-Girl-Print/Prod/pgeproduct.aspx?iid=2409264
[1] => http://www.example.com/mysite/mysite-T-Shirt-With-Dork-Print/Prod/pgeproduct.aspx?iid=2483696
[2] => http://www.example.com/mysite/mysite-T-Shirt-With-Kasabian-Print/Prod/pgeproduct.aspx?iid=2428327
[3] => http://www.example.com/mysite/mysite-Long-Sleeve-Crew-Neck-T-Shirt-With-Pocket/Prod/pgeproduct.aspx?iid=2548469
[4] => http://www.example.com/Scotch-Soda/Scotch-And-Soda-T-Shirt-In-Washed-Cotton/Prod/pgeproduct.aspx?iid=2496980
//...
[147] => http://www.example.com/BePriv/Be-Priv-90210-Tiffany-T-shirt-Exclusive-To-mysite-UK/Prod/pgeproduct.aspx?iid=2262271
[148] => http://www.example.com/The-Quiet-Life/The-Quiet-Life-Start-Making-Sense-T-Shirt/Prod/pgeproduct.aspx?iid=2200659
[149] => http://www.example.com/The-Quiet-Life/The-Quiet-Life-Camera-Statue-T-Shirt/Prod/pgeproduct.aspx?iid=2200660
Entire Print_r Output (using Raheel Shan's method)
200Array
(
[0] => http://www.example.com/mysite/mysite-Vest-With-Girl-Print/Prod/pgeproduct.aspx?iid=2409264
[1] => http://www.example.com/mysite/mysite-T-Shirt-With-Dork-Print/Prod/pgeproduct.asp