I have an array:
Array ( [0] => Ahri [1] => Akali [2] => Alistar [3] => Amumu [4] => Anivia [5] => Annie [6] => Ashe [7] => Blitzcrank [8] => Brand [9] => Caitlyn [10] => Cassiopeia [11] => Cho'Gath [12] => Corki [13] => Dr. Mundo [14] => Evelynn [15] => Ezreal [16] => Fiddlesticks [17] => Fiora [18] => Fizz [19] => Galio [20] => Gangplank [21] => Garen [22] => Gragas [23] => Graves [24] => Hecarim [25] => Heimerdinger [26] => Irelia [27] => Janna [28] => Jarvan IV [29] => Jax [30] => Karma [31] => Karthus [32] => Kassadin [33] => Katarina [34] => Kayle [35] => Kennen [36] => Kog'Maw [37] => LeBlanc [38] => Lee Sin [39] => Leona [40] => Lulu [41] => Lux [42] => Malphite [43] => Malzahar [44] => Maokai [45] => Master Yi [46] => Miss Fortune [47] => Mordekaiser [48] => Morgana [49] => Nasus [50] => Nautilus [51] => Nidalee [52] => Nocturne [53] => Nunu [54] => Olaf [55] => Orianna [56] => Pantheon [57] => Poppy [58] => Rammus [59] => Renekton [60] => Riven [61] => Rumble [62] => Ryze [63] => Sejuani [64] => Shaco [65] => Shen [66] => Shyvana [67] => Singed [68] => Sion [69] => Sivir [70] => Skarner [71] => Sona [72] => Soraka [73] => Swain [74] => Talon [75] => Taric [76] => Teemo [77] => Tristana [78] => Trundle [79] => Tryndamere [80] => Twisted Fate [81] => Twitch [82] => Udyr [83] => Urgot [84] => Varus [85] => Vayne [86] => Veigar [87] => Viktor [88] => Vladimir [89] => Volibear [90] => Warwick [91] => Wukong [92] => Xerath [93] => Xin Zhao [94] => Yorick [95] => Ziggs [96] => Zilean [97] => Lee Sin [98] => Orianna [99] => Yorick [100] => Leona [101] => Riven [102] => Lulu [103] => Hecarim [104] => Varus [105] => Malphite [106] => Morgana [107] => Ryze [108] => Annie [109] => Cho'Gath [110] => Taric [111] => Jax [112] => Teemo [113] => Warwick [114] => Poppy [115] => Garen [116] => Anivia [117] => Blitzcrank [118] => Corki [119] => Karthus [120] => Twitch [121] => Irelia [122] => Miss Fortune [123] => Galio [124] => Swain [125] => Kennen [126] => Malzahar )
I need to use each of these values inside the following function:
$input=file_get_contents("http://leagueoflegends.wikia.com/api.php?action=query&titles=$value&prop=revisions&rvprop=content&format=xml");
Where the $value is a value from the array (eg. Ahri).
How can I achieve this?
Edit: I get these values by doing:
$file = file_get_contents('http://leagueoflegends.wikia.com/api.php?action=query&titles=List_of_champions&prop=revisions&rvprop=content&format=xml');
preg_match_all('/{{ci\|([^}]*)}}/', $file, $matches);
(Where $matches is the array mentioned above.)
Or, you can use the inbuilt way for the LeagueOfLegends API and retrieve all values at the same time by separating each title with the | character. Like so:
$values = array("Ahri","Akali","Alistar");
$input = "";
while($pack = array_splice($values,0,49)){
$concatValues = implode("|",$values); // Will return "Ahri|Akali|Alistar";
$url = "http://leagueoflegends.wikia.com/api.php?action=query&titles=$concatValues&prop=revisions&rvprop=content&format=xml";
$input .= file_get_contents($url);
}
Which for the first three elements of your code, would return the following, you can do it one by one, but the API etiquette suggests that you do the least number of requests to get the data you're after.
<api>
<query>
<pages>
<page pageid="281432" ns="0" title="Ahri">
<revisions>
<rev xml:space="preserve">#REDIRECT [[Ahri the 9 Tails Fox]]</rev>
</revisions>
</page>
<page pageid="5578" ns="0" title="Akali">
<revisions>
<rev xml:space="preserve">#REDIRECT [[Akali the Fist of Shadow]]</rev>
</revisions>
</page>
<page pageid="2202" ns="0" title="Alistar">
<revisions>
<rev xml:space="preserve">#REDIRECT [[Alistar the Minotaur]]</rev>
</revisions>
</page>
</pages>
</query>
</api>
Note that the results are cached, so if you want to get the same data twice, make sure to use the same request and not alter the order of the elements, since a new order would result in a new url and the results being fetched again from their servers instead of serving the API cached version.
Update
Looking at the values in the array, I see some 'titles' that contains quotes and would therefor break the url. You should encode the url with url encode prior to using it.
Related
I'm working in a cakephp 1.3 project. I have a problem retrieving some data from my database using find('list'). Before my last change I had this code:
$listaHabilidades = $this->Habilidad->find('list',array('fields'=>array('id','habilidad'),'order'=>array('habilidad'))));
This command gives me the next array:
Array
(
[40] => Bicicleta
[42] => enganches de poleas
[28] => Escalada
[43] => transfer
[41] => 4x4
[53] => Administración Linux
[72] => Ángeles
[59] => Baile Flamenco
[57] => Baloncesto
[39] => Barranquismo
[66] => Cante Flamenco
[30] => Conducción
[52] => Consola Linux
[80] => cuarta prueba
[75] => Demonios
[84] => Esgrima
[58] => Futbol
[76] => Limpiar
[77] => Limpiar2
[54] => Linux
[27] => Montañismo
[60] => MS Office
[65] => Natación
[45] => Patinaje
[56] => PC
[78] => probar
[44] => Programación
[82] => Protocolo
[81] => quinta prueba
[63] => Tenis
[79] => tercera prueba
[83] => Triatlón
[55] => W8
[51] => XP
[64] => Zapateado
)
But I had a problem because the data can have spaces at the begining of the field 'habilidad' and I want to get the data without the and order them also without them. So I changed the command to:
$listaHabilidades = $this->Habilidad->find('list',array('fields'=>array('id','trim(Habilidad.habilidad)'),'order'=>array('trim(Habilidad.habilidad)'))));
It gives me the next array:
Array
(
[41] =>
[53] =>
[72] =>
[59] =>
[57] =>
[39] =>
[40] =>
[66] =>
[30] =>
[52] =>
[80] =>
[75] =>
[42] =>
[28] =>
[84] =>
[58] =>
[76] =>
[77] =>
[54] =>
[27] =>
[60] =>
[65] =>
[45] =>
[56] =>
[78] =>
[44] =>
[82] =>
[81] =>
[63] =>
[79] =>
[43] =>
[83] =>
[55] =>
[51] =>
[64] =>
)
How can I get the list trimmed (without loops)?
Can you add a virtual field to your model:
public $virtualFields = array(
't_habilidad' => 'LTRIM(Habilidad.habilidad)'
);
Then use
$listaHabilidades = $this->Habilidad->find('list', array('fields'=>array('id','habilidad'), 'order' => array('t_habilidad'))));
Not exactly sure how CakePHP generates the query internally, but you can just trim it in php after retrieval
$listaHabilidades = $this->Habilidad->find('list',array('fields'=>array('id','habilidad'),'order'=>array('habilidad'))));
$listaHabilidades = array_map('trim', $listaHabilidades);
// voila
EDIT
I'm trying to run a php file in background without success using one of those function.
This is not the file that will be execute in backgorund (the real one will send emails), I use this method to find out which command parameter is the correct one
File permission 0644; Folder permission: 0755
tets.php:
<html>
<head>
</head>
<body>
<pre>
<?php
$ex='php5 -f /homepages/23/d293813614/htdocs/amazonmobilewebsites/extendedcomingsoon/admin/run.php';
exec($ex,$return);
echo print_r($return,true);
?>
</pre>
</body>
</html>
run.php(works from url):
<html>
<head>
</head>
<body>
<pre>
<?php
$fp = fopen('/homepages/23/d293813614/htdocs/amazonmobilewebsites/extendedcomingsoon/admin/data.txt', 'w+');
fwrite($fp, '1');
fclose($fp);
echo 'printed';
?>
</pre>
</body>
</html>
these are my tries:
$ex='php5 -f /homepages/23/d293813614/htdocs/amazonmobilewebsites/extendedcomingsoon/admin/run.php';
$ex='php -f /homepages/23/d293813614/htdocs/amazonmobilewebsites/extendedcomingsoon/admin/run.php';
$ex='/usr/lib/php6 -f /homepages/23/d293813614/htdocs/amazonmobilewebsites/extendedcomingsoon/admin/run.php';
Fisrt->
Array
[89] => [79] => [69] => [59] => [49] => [39] => [29] => [19] => [9] => (
[90] => [80] => [70] => [60] => [50] => [40] => [30] => [20] => [10] => [0] => X-Powered-By: PHP/5.2.17
[91] => [81] => [71] => [61] => [51] => [41] => [31] => [21] => [11] => [1] => Content-type: text/html
[92] => [82] => [72] => [62] => [52] => [42] => [32] => [22] => [12] => [2] =>
[93] => [83] => [73] => [63] => [53] => [43] => [33] => [23] => [13] => [3] =>
[94] => [84] => [74] => [64] => [54] => [44] => [34] => [24] => [14] => [4] =>
[95] => [85] => [75] => [65] => [55] => [45] => [35] => [25] => [15] => [5] =>
[96] => [86] => [76] => [66] => [56] => [46] => [36] => [26] => [16] => [6] =>
[97] => [87] => [77] => [67] => [57] => [47] => [37] => [27] => [17] => [7] =>
[98] => [88] => [78] => [68] => [58] => [48] => [38] => [28] => [18] => [8] =>
[99] => [89] => [79] => [69] => [59] => [49] => [39] => [29] => [19] => [9] => Warning: exec() [function.exec]: Unable to fork [php5 -f /homepages/23/d293813614/htdocs/amazonmobilewebsites/extendedcomingsoon/admin/run.php] in /homepages/23/d293813614/htdocs/amazonmobilewebsites/extendedcomingsoon/admin/test.php on line 8
[100] => [90] => [80] => [70] => [60] => [50] => [40] => [30] => [20] => [10] => Array
[101] => [91] => [81] => [71] => [61] => [51] => [41] => [31] => [21] => [11] => (
[102] => [92] => [82] => [72] => [62] => [52] => [42] => [32] => [22] => [12] => )
[103] => [93] => [83] => [73] => [63] => [53] => [43] => [33] => [23] => [13] =>
[104] => [94] => [84] => [74] => [64] => [54] => [44] => [34] => [24] => [14] =>
[105] => [95] => [85] => [75] => [65] => [55] => [45] => [35] => [25] => [15] =>
[106] => [96] => [86] => [76] => [66] => [56] => [46] => [36] => [26] => )
the second the same array without the warning and the third is an empty array
It's probably disabled on your host, but php itself isn't, so why don't you just include the file?
If your php is going to take a long time to run you can do the following:
ignore_user_abort(true);
set_time_limit(0);
your_long_function();
This will mean your script keeps running indefinitely (you can leave the page), which is potentially a dangerous thing to do. Be careful not to make any infinite loops.
ignore_user_abort
set_time_limit
See this answer for some other options too.
Hello I would like to create a page html and php that is able to take the data in the table contained at this link: http://www.comuni-italiani.it/province.html
I would love to have any tips, I would use the file_get_content but then I do not know how to take all the various data
Can you explain us more clearly what you want to exactly take from this page?
Anyway, to do the trick, you can use file_get_contents to fetch the page then, according to what you want to take from the page (I suppose you want to take every <td> element from the page inside a table), you may use PHP regular expressions (preg_match, preg_match_all) to fetch all the data you need.
Example for your case:
$page = file_get_contents("http://www.comuni-italiani.it/province.html");
$output = array();
preg_match_all('/<td.*.<\/td>/',$page,$output);
print_r($output);
This will output:
Array ( [0] => Array ( [0] => [1] => [2] => Agrigento [3] => Alessandria [4] => Ancona [5] => Aosta [6] => Arezzo [7] => Ascoli Piceno [8] => Asti [9] => Avellino [10] => Bari [11] => Barletta-Andria-Trani [12] => Belluno [13] => Benevento [14] => Bergamo [15] => Biella [16] => Bologna [17] => Bolzano [18] => Brescia [19] => Brindisi [20] => Cagliari [21] => Caltanissetta [22] => Campobasso [23] => Carbonia-Iglesias [24] => Caserta [25] => Catania [26] => Catanzaro [27] => Chieti [28] => Como [29] => Cosenza [30] => Cremona [31] => Crotone [32] => Cuneo [33] => Enna [34] => Fermo [35] => Ferrara [36] => Firenze [37] => Foggia [38] => Forlì-Cesena [39] => Frosinone [40] => Genova [41] => Gorizia [42] => Grosseto [43] => Imperia [44] => Isernia [45] => La Spezia [46] => L'Aquila [47] => Latina [48] => Lecce [49] => Lecco [50] => Livorno [51] => Lodi [52] => Lucca [53] => Macerata [54] => Mantova [55] => Massa-Carrara [56] => Matera [57] => Messina [58] => Milano [59] => Modena [60] => Monza e della Brianza [61] => Napoli [62] => Novara [63] => Nuoro [64] => Olbia-Tempio [65] => Oristano [66] => Padova [67] => Palermo [68] => Parma [69] => Pavia [70] => Perugia [71] => Pesaro e Urbino [72] => Pescara [73] => Piacenza [74] => Pisa [75] => Pistoia [76] => Pordenone [77] => Potenza [78] => Prato [79] => Ragusa [80] => Ravenna [81] => Reggio Calabria [82] => Reggio Emilia [83] => Rieti [84] => Rimini [85] => Roma [86] => Rovigo [87] => Salerno [88] => Medio Campidano [89] => Sassari [90] => Savona [91] => Siena [92] => Siracusa [93] => Sondrio [94] => Taranto [95] => Teramo [96] => Terni [97] => Torino [98] => Ogliastra [99] => Trapani [100] => Trento [101] => Treviso [102] => Trieste [103] => Udine [104] => Varese [105] => Venezia [106] => Verbano-Cusio-Ossola [107] => Vercelli [108] => Verona [109] => Vibo Valentia [110] => Vicenza [111] => Viterbo [112] => CercaNel Sito e sul WebPagine UtiliElenco Province per PopolazionePrincipali Città ItalianeLista Alfabetica RegioniAmministrazioni LocaliScuole in Italia [113] => ) )
which can, of course, be filtered.
In your case, for example, by adding a little foreach loop... :
$page = file_get_contents("http://www.comuni-italiani.it/province.html");
$output = array();
preg_match_all('/<td.*.<\/td>/',$page,$output);
$provinces = array();
foreach ($output as $id => $list) {
for ($i = 2; $i <= 111; $i++) {
array_push($provinces,$list[$i]);
}
}
print_r($provinces);
Will give you this:
Array ( [0] => Agrigento [1] => Alessandria [2] => Ancona [3] => Aosta [4] => Arezzo [5] => Ascoli Piceno [6] => Asti [7] => Avellino [8] => Bari [9] => Barletta-Andria-Trani [10] => Belluno [11] => Benevento [12] => Bergamo [13] => Biella [14] => Bologna [15] => Bolzano [16] => Brescia [17] => Brindisi [18] => Cagliari [19] => Caltanissetta [20] => Campobasso [21] => Carbonia-Iglesias [22] => Caserta [23] => Catania [24] => Catanzaro [25] => Chieti [26] => Como [27] => Cosenza [28] => Cremona [29] => Crotone [30] => Cuneo [31] => Enna [32] => Fermo [33] => Ferrara [34] => Firenze [35] => Foggia [36] => Forlì-Cesena [37] => Frosinone [38] => Genova [39] => Gorizia [40] => Grosseto [41] => Imperia [42] => Isernia [43] => La Spezia [44] => L'Aquila [45] => Latina [46] => Lecce [47] => Lecco [48] => Livorno [49] => Lodi [50] => Lucca [51] => Macerata [52] => Mantova [53] => Massa-Carrara [54] => Matera [55] => Messina [56] => Milano [57] => Modena [58] => Monza e della Brianza [59] => Napoli [60] => Novara [61] => Nuoro [62] => Olbia-Tempio [63] => Oristano [64] => Padova [65] => Palermo [66] => Parma [67] => Pavia [68] => Perugia [69] => Pesaro e Urbino [70] => Pescara [71] => Piacenza [72] => Pisa [73] => Pistoia [74] => Pordenone [75] => Potenza [76] => Prato [77] => Ragusa [78] => Ravenna [79] => Reggio Calabria [80] => Reggio Emilia [81] => Rieti [82] => Rimini [83] => Roma [84] => Rovigo [85] => Salerno [86] => Medio Campidano [87] => Sassari [88] => Savona [89] => Siena [90] => Siracusa [91] => Sondrio [92] => Taranto [93] => Teramo [94] => Terni [95] => Torino [96] => Ogliastra [97] => Trapani [98] => Trento [99] => Treviso [100] => Trieste [101] => Udine [102] => Varese [103] => Venezia [104] => Verbano-Cusio-Ossola [105] => Vercelli [106] => Verona [107] => Vibo Valentia [108] => Vicenza [109] => Viterbo )
(Sorry for the huge arrays).
It is, however, keeping the links inside the array so, if you want to take the values only and NOT the anchor associated to it, just feel free to use another regular expression.
Hope this helps.
(take this as an example, keep in mind that this foreach trick may not work anymore if the page gets changed, I posted it just to give you an idea on how you may have solved that case).
Try to look more into DOMDocument reference : http://php.net/manual/en/class.domdocument.php
Also Those questions might be helpful for you:
Getting DOM elements by classname
PHP Parse HTML code
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.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
[5] => http://www.example.com/Scotch-Soda/Scotch-And-Soda-T-Shirt-with-Block-Hoop/Prod/pgeproduct.aspx?iid=2496983
[6] => http://www.example.com/Carhartt/Carhartt-Marker-T-Shirt/Prod/pgeproduct.aspx?iid=2453973
[7] => http://www.example.com/Levis-Vintage/Levis-Vintage-T-Shirt-1950-Sportswear/Prod/pgeproduct.aspx?iid=2270995
[8] => http://www.example.com/The-Quiet-Life/The-Quiet-Life-Camera-Club-T-shirt-Bike/Prod/pgeproduct.aspx?iid=2494276
[9] => http://www.example.com/Reclaimed-Vintage/Reclaimed-Vintage-Vest-with-Paisley-Peace-Print/Prod/pgeproduct.aspx?iid=2533797
[10] => http://www.example.com/Supreme-Being/Supremebeing-White-Canvas-Project-T-Shirt-Mr-Jago/Prod/pgeproduct.aspx?iid=2363025
[11] => http://www.example.com/Reclaimed-Vintage/Reclaimed-Vintage-T-Shirt-with-Tye-Dye-Print/Prod/pgeproduct.aspx?iid=2533633
[12] => http://www.example.com/Emporio-Armani/Emporio-Armani-Pure-Cotton-Crew-T-Shirt/Prod/pgeproduct.aspx?iid=1999130
[13] => http://www.example.com/mysite/mysite-T-Shirt-With-Layered-Print/Prod/pgeproduct.aspx?iid=2457845
[14] => http://www.example.com/Diesel/Diesel-T-Shirt-With-Stamp-Print/Prod/pgeproduct.aspx?iid=2441057
[15] => http://www.example.com/Diesel/Diesel-T-Shirt-With-Label-Print/Prod/pgeproduct.aspx?iid=2441126
[16] => http://www.example.com/Lee/Lee-T-Shirt-With-Play-Print/Prod/pgeproduct.aspx?iid=2425959
[17] => http://www.example.com/Lee/Lee-T-Shirt-With-Print/Prod/pgeproduct.aspx?iid=2426033
[18] => http://www.example.com/Lee/Lee-Grandad-Top/Prod/pgeproduct.aspx?iid=2425415
[19] => http://www.example.com/Nike-Skateboard/Nike-Skateboarding-T-Shirt-Speciman-Icon/Prod/pgeproduct.aspx?iid=2445650
[20] => http://www.example.com/American-Apparel/American-Apparel-Muscle-Tank/Prod/pgeproduct.aspx?iid=2503093
[21] => http://www.example.com/Religion/Religion-Safety-Pin-Skull-T-Shirt/Prod/pgeproduct.aspx?iid=2398683
[22] => http://www.example.com/Religion/Religion-Clash-Long-Sleeve-Top/Prod/pgeproduct.aspx?iid=2398419
[23] => http://www.example.com/American-Apparel/American-Apparel-Helvetica-T-Shirt-ZZ/Prod/pgeproduct.aspx?iid=2502997
[24] => http://www.example.com/American-Apparel/American-Apparel-Helvetica-T-Shirt-XX/Prod/pgeproduct.aspx?iid=2502998
[25] => http://www.example.com/American-Apparel/American-Apparel-3/4-Sleeve-Raglan-Top/Prod/pgeproduct.aspx?iid=2503354
[26] => http://www.example.com/Nike-Skateboard/Nike-Skateboarding-Laces-T-Shirt/Prod/pgeproduct.aspx?iid=2445588
[27] => http://www.example.com/mysite/mysite-T-Shirt-With-Animal-Print-Girl-Print/Prod/pgeproduct.aspx?iid=2410231
[28] => http://www.example.com/mysite/mysite-T-Shirt-With-Oxford-Pocket/Prod/pgeproduct.aspx?iid=2480313
[29] => http://www.example.com/mysite/mysite-Stripe-T-Shirt-With-Pocket/Prod/pgeproduct.aspx?iid=2420685
[30] => http://www.example.com/mysite/mysite-T-Shirt-With-Flag-Print/Prod/pgeproduct.aspx?iid=2484341
[31] => http://www.example.com/Cheap-Monday/Cheap-Monday-Stripe-T-Shirt/Prod/pgeproduct.aspx?iid=2379675
[32] => http://www.example.com/Cheap-Monday/Cheap-Monday-Tor-T-Shirt/Prod/pgeproduct.aspx?iid=2379596
[33] => http://www.example.com/Hilfiger-Denim/Hilfiger-Denim-T-Shirt/Prod/pgeproduct.aspx?iid=2309725
[34] => http://www.example.com/Franklin-Marshall/Franklin-Marshall-T-Shirt/Prod/pgeproduct.aspx?iid=2360997
[35] => http://www.example.com/Denham/Denham-T-Shirt-Barnum-Pocket/Prod/pgeproduct.aspx?iid=2302619
[36] => http://www.example.com/Analog/Analog-Baseball-T-Shirt/Prod/pgeproduct.aspx?iid=2445332
[37] => http://www.example.com/Analog/Analog-T-shirt-Astro-Dot/Prod/pgeproduct.aspx?iid=2445516
[38] => http://www.example.com/Adidas-Originals/Adidas-Originals-T-Shirt-Stencil-Trefoil/Prod/pgeproduct.aspx?iid=2447712
[39] => http://www.example.com/Adidas-Originals/Adidas-Originals-T-Shirt-Fine-Stripe-Trefoil-Logo/Prod/pgeproduct.aspx?iid=2447613
[40] => http://www.example.com/Adidas-Originals/Adidas-Originals-Superstar-T-Shirt/Prod/pgeproduct.aspx?iid=2446200
[41] => http://www.example.com/Adidas-Originals/Adidas-Originals-Originals-Icon-T-Shirt/Prod/pgeproduct.aspx?iid=2446130
[42] => http://www.example.com/Adidas-Originals/Adidas-Originals-T-Shirt-Trefoil-Rasta/Prod/pgeproduct.aspx?iid=2349590
[43] => http://www.example.com/Adidas-Originals/Adidas-Originals-T-Shirt-Masking-Tape/Prod/pgeproduct.aspx?iid=2349584
[44] => http://www.example.com/Adidas-Originals/Adidas-Originals-Superstar-T-Shirt/Prod/pgeproduct.aspx?iid=2446162
[45] => http://www.example.com/Adidas-Originals/Adidas-Originals-Daily-Hustle-T-Shirt/Prod/pgeproduct.aspx?iid=2349550
[46] => http://www.example.com/G-Star/G-Star-T-Shirt-Elwood-Restany-Motorbike-Logo/Prod/pgeproduct.aspx?iid=2258870
[47] => http://www.example.com/mysite/mysite-Long-Sleeved-T-Shirt-With-Grandad-Collar-In-Pique-Jersey/Prod/pgeproduct.aspx?iid=2395254
[48] => http://www.example.com/Religion/Religion-Basic-Scoop-Neck-T-Shirt/Prod/pgeproduct.aspx?iid=1397435
[49] => http://www.example.com/mysite/mysite-Vest-With-Racer-Back/Prod/pgeproduct.aspx?iid=2457514
[50] => http://www.example.com/mysite/mysite-T-Shirt-With-Varsity-Print/Prod/pgeproduct.aspx?iid=2484233
[51] => http://www.example.com/Lazy-Oaf/Lazy-Oaf-Log-In-T-Shirt/Prod/pgeproduct.aspx?iid=2366658
[52] => http://www.example.com/Ezra-Wine/Ezra-Wine-Medusa-T-Shirt/Prod/pgeproduct.aspx?iid=2383291
[53] => http://www.example.com/Lazy-Oaf/Lazy-Oaf-Dropout-T-Shirt/Prod/pgeproduct.aspx?iid=2366535
[54] => http://www.example.com/Lazy-Oaf/Lazy-Oaf-T-Shirt-with-Tongue-Pocket/Prod/pgeproduct.aspx?iid=2366527
[55] => http://www.example.com/Lazy-Oaf/Lazy-Oaf-Going-to-Hell-T-Shirt/Prod/pgeproduct.aspx?iid=2366525
[56] => http://www.example.com/Denham/Denham-T-Shirt-With-Pocket/Prod/pgeproduct.aspx?iid=2511832
[57] => http://www.example.com/55DSL/55DSL-Hula-T-Shirt/Prod/pgeproduct.aspx?iid=2375696
[58] => http://www.example.com/55DSL/55DSL-Sky-T-Shirt/Prod/pgeproduct.aspx?iid=2375931
[59] => http://www.example.com/Selected/Selected-Stripe-T-Shirt/Prod/pgeproduct.aspx?iid=2504193
[60] => http://www.example.com/Selected/Selected-Stripe-T-Shirt/Prod/pgeproduct.aspx?iid=2504191
[61] => http://www.example.com/Selected/Selected-T-shirt-with-Double-Layer/Prod/pgeproduct.aspx?iid=2504184
[62] => http://www.example.com/Selected/Selected-T-Shirt-with-Double-Layer/Prod/pgeproduct.aspx?iid=2504135
[63] => http://www.example.com/Denham/Denham-T-Shirt-With-Scissor-Print/Prod/pgeproduct.aspx?iid=2511889
[64] => http://www.example.com/Replay/Replay-T-Shirt-With-V-Neck/Prod/pgeproduct.aspx?iid=2423227
[65] => http://www.example.com/Lazy-Oaf/Lazy-Oaf-Patches-T-Shirt/Prod/pgeproduct.aspx?iid=2366648
[66] => http://www.example.com/Lazy-Oaf/Lazy-Oaf-T-Shirt-with-FC-Stripe/Prod/pgeproduct.aspx?iid=2366533
[67] => http://www.example.com/Lazy-Oaf/Lazy-Oaf-T-Shirt-with-Bandana-Pocket/Prod/pgeproduct.aspx?iid=2366528
[68] => http://www.example.com/Lazy-Oaf/Lazy-Oaf-End-is-Nigh-T-Shirt/Prod/pgeproduct.aspx?iid=2366425
[69] => http://www.example.com/Christopher-Shannon/Christopher-Shannon-Kidda-Laurel-T-Shirt/Prod/pgeproduct.aspx?iid=2323166
[70] => http://www.example.com/The-Quiet-Life/The-Quiet-Life-T-shirt-With-Cosmo-Pocket/Prod/pgeproduct.aspx?iid=2494015
[71] => http://www.example.com/Selected/Selected-T-Shirt-with-Pocket/Prod/pgeproduct.aspx?iid=2365377
[72] => http://www.example.com/Selected/Selected-Fleck-T-Shirt/Prod/pgeproduct.aspx?iid=2412803
[73] => http://www.example.com/mysite/mysite-T-Shirt-With-Aztec-Animal-Print/Prod/pgeproduct.aspx?iid=2412464
[74] => http://www.example.com/Worn-By/Worn-By-Neon-Tribal-T-Shirt/Prod/pgeproduct.aspx?iid=2305500
[75] => http://www.example.com/Worn-By/Worn-By-Hell-Yeah-T-Shirt/Prod/pgeproduct.aspx?iid=2305595
[76] => http://www.example.com/Religion/Religion-Razor-T-Shirt/Prod/pgeproduct.aspx?iid=2303944
[77] => http://www.example.com/mysite/mysite-T-Shirt-With-All-Over-Paisley-Print-And-Contrast-Pocket/Prod/pgeproduct.aspx?iid=2405169
[78] => http://www.example.com/River-Island/River-Island-Vest-with-Surf-Print/Prod/pgeproduct.aspx?iid=2391220
[79] => http://www.example.com/Selected/Selected-Stripe-Vest/Prod/pgeproduct.aspx?iid=2299829
[80] => http://www.example.com/Selected/Selected-Stripe-Vest/Prod/pgeproduct.aspx?iid=2299786
[81] => http://www.example.com/River-Island/River-Island-Motel-Vest/Prod/pgeproduct.aspx?iid=2398677
[82] => http://www.example.com/River-Island/River-Island-Vest/Prod/pgeproduct.aspx?iid=2398569
[83] => http://www.example.com/River-Island/River-Island-Vest-with-Shanghai-Print/Prod/pgeproduct.aspx?iid=2391145
[84] => http://www.example.com/Cheap-Monday/Cheap-Monday-Mond-T-Shirt/Prod/pgeproduct.aspx?iid=2379599
[85] => http://www.example.com/Esprit/Esprit-Vest/Prod/pgeproduct.aspx?iid=2249197
[86] => http://www.example.com/Reclaimed-Vintage/Reclaimed-Vintage-Russian-Naval-T-Shirts/Prod/pgeproduct.aspx?iid=2274797
[87] => http://www.example.com/Worn-By/Worn-By-Zebra-T-Shirt/Prod/pgeproduct.aspx?iid=2305605
[88] => http://www.example.com/Savant/Savant-Fresh-T-Shirt/Prod/pgeproduct.aspx?iid=2187734
[89] => http://www.example.com/New-Love-Club/New-Love-Club-Nude-T-Shirt/Prod/pgeproduct.aspx?iid=2031399
[90] => http://www.example.com/Your-Eyes-Lie/Your-Eyes-Lie-All-for-You-Vest/Prod/pgeproduct.aspx?iid=1996304
[91] => http://www.example.com/People-Tree/People-Tree-Sydney-Vest/Prod/pgeproduct.aspx?iid=2072528
[92] => http://www.example.com/mysite/mysite-Vest-With-Aztec-Design/Prod/pgeproduct.aspx?iid=2351895
[93] => http://www.example.com/mysite/mysite-Vest-With-All-Over-Geo-Print/Prod/pgeproduct.aspx?iid=2373754
[94] => http://www.example.com/mysite/mysite-Stripe-T-Shirt-With-Pocket/Prod/pgeproduct.aspx?iid=2257136
[95] => http://www.example.com/mysite/mysite-Stripe-T-Shirt-With-Pocket/Prod/pgeproduct.aspx?iid=2257138
[96] => http://www.example.com/mysite/mysite-Crew-Long-Sleeve-Top-With-Pocket/Prod/pgeproduct.aspx?iid=1874647
[97] => http://www.example.com/mysite/mysite-T-Shirt-With-Flower-Print/Prod/pgeproduct.aspx?iid=2373623
[98] => http://www.example.com/mysite/mysite-Crew-Neck-T-Shirt-With-Pocket/Prod/pgeproduct.aspx?iid=1605761
[99] => http://www.example.com/mysite/mysite-T-Shirt-With-Skull-Print/Prod/pgeproduct.aspx?iid=2483379
[100] => http://www.example.com/mysite/mysite-T-Shirt-With-Sex-Pistols-Print/Prod/pgeproduct.aspx?iid=2420836
[101] => http://www.example.com/mysite/mysite-T-Shirt-With-Aztec-Girl-Print/Prod/pgeproduct.aspx?iid=2409391
[102] => http://www.example.com/mysite/mysite-T-Shirt-With-Camo-Print-And-Chambray-Pocket/Prod/pgeproduct.aspx?iid=2408949
[103] => http://www.example.com/mysite/mysite-T-Shirt-With-In-There-Like-Swimwear-Print/Prod/pgeproduct.aspx?iid=2404269
[104] => http://www.example.com/mysite/mysite-T-Shirt-With-Camo-Pocket/Prod/pgeproduct.aspx?iid=2336996
[105] => http://www.example.com/mysite/mysite-T-Shirt-With-All-Over-Pattern/Prod/pgeproduct.aspx?iid=2367036
[106] => http://www.example.com/mysite/mysite-T-Shirt-With-Giant-Aztec-Print/Prod/pgeproduct.aspx?iid=2373696
[107] => http://www.example.com/mysite/mysite-Crew-Neck-T-Shirt-With-Pocket/Prod/pgeproduct.aspx?iid=2378610
[108] => http://www.example.com/mysite/mysite-T-Shirt-With-All-Over-Space-Print/Prod/pgeproduct.aspx?iid=2368944
[109] => http://www.example.com/mysite/mysite-3/4-Sleeve-Top-In-Waffle-Jersey/Prod/pgeproduct.aspx?iid=2395846
[110] => http://www.example.com/mysite/mysite-Vest-With-Fluro-Stripe/Prod/pgeproduct.aspx?iid=2352422
[111] => http://www.example.com/mysite/mysite-Vest-With-David-Bowie-Print/Prod/pgeproduct.aspx?iid=2393776
[112] => http://www.example.com/mysite/mysite-T-Shirt-With-Shoulder-Patch/Prod/pgeproduct.aspx?iid=2364066
[113] => http://www.example.com/mysite/mysite-T-Shirt-With-Deep-V-Neck/Prod/pgeproduct.aspx?iid=2428120
[114] => http://www.example.com/mysite/mysite-T-Shirt-With-Shoulder-Patch/Prod/pgeproduct.aspx?iid=2375275
[115] => http://www.example.com/mysite/mysite-T-Shirt-With-Mystic-Eye-Print/Prod/pgeproduct.aspx?iid=2407356
[116] => http://www.example.com/mysite/mysite-T-Shirt-With-Aztec-Hem-Print/Prod/pgeproduct.aspx?iid=2371017
[117] => http://www.example.com/mysite/mysite-T-Shirt-With-All-Over-Hula-Girl-Print/Prod/pgeproduct.aspx?iid=2407724
[118] => http://www.example.com/mysite/mysite-T-Shirt-With-Colorado-Print/Prod/pgeproduct.aspx?iid=2352880
[119] => http://www.example.com/mysite/mysite-T-Shirt-With-All-Over-Print/Prod/pgeproduct.aspx?iid=2412241
[120] => http://www.example.com/mysite/mysite-Stripe-T-Shirt-With-Flag-Print/Prod/pgeproduct.aspx?iid=2363870
[121] => http://www.example.com/mysite/mysite-Vest-With-Tape-And-Pocket/Prod/pgeproduct.aspx?iid=2351801
[122] => http://www.example.com/mysite/mysite-Vest-USA-Flag-Print/Prod/pgeproduct.aspx?iid=2352165
[123] => http://www.example.com/mysite/mysite-T-Shirt-With-All-Over-And-Double-Layer-Print/Prod/pgeproduct.aspx?iid=2364006
[124] => http://www.example.com/mysite/mysite-Long-Sleeve-Top-With-Deep-V/Prod/pgeproduct.aspx?iid=1873299
[125] => http://www.example.com/mysite/mysite-Stripe-T-Shirt-With-Two-Tone-Jersey-Marl/Prod/pgeproduct.aspx?iid=2368253
[126] => http://www.example.com/mysite/mysite-Stripe-T-Shirt/Prod/pgeproduct.aspx?iid=2373649
[127] => http://www.example.com/mysite/mysite-T-Shirt-With-All-Over-Aztec-Stripe/Prod/pgeproduct.aspx?iid=2405360
[128] => http://www.example.com/mysite/mysite-T-Shirt-With-All-Over-Print-And-Contrast-Neck-Trim/Prod/pgeproduct.aspx?iid=2412415
[129] => http://www.example.com/mysite/mysite-T-Shirt-With-Mask-Print/Prod/pgeproduct.aspx?iid=2412477
[130] => http://www.example.com/mysite/mysite-T-Shirt-With-Bill-And-Ted-Print/Prod/pgeproduct.aspx?iid=2320906
[131] => http://www.example.com/mysite/mysite-T-Shirt-With-Dip-Dye-Hem/Prod/pgeproduct.aspx?iid=2373764
[132] => http://www.example.com/mysite/mysite-Stripe-Vest/Prod/pgeproduct.aspx?iid=2250612
[133] => http://www.example.com/Solid/Solid-T-Shirt/Prod/pgeproduct.aspx?iid=2354420
[134] => http://www.example.com/mysite/mysite-T-Shirt-With-Printed-Woven-Pocket/Prod/pgeproduct.aspx?iid=2394637
[135] => http://www.example.com/mysite/mysite-T-Shirt-With-Printed-Woven-Pocket/Prod/pgeproduct.aspx?iid=2375274
[136] => http://www.example.com/mysite/mysite-T-Shirt-With-Fish-Print/Prod/pgeproduct.aspx?iid=2269490
[137] => http://www.example.com/Bellfield/Bellfield-Aztec-T-Shirt/Prod/pgeproduct.aspx?iid=2383222
[138] => http://www.example.com/Esprit/Esprit-T-Shirt-with-Surf-Print/Prod/pgeproduct.aspx?iid=2249271
[139] => http://www.example.com/mysite/mysite-T-Shirt-With-Rolled-Sleeves/Prod/pgeproduct.aspx?iid=2412631
[140] => http://www.example.com/Reclaimed-Vintage/Reclaimed-Vintage-Russian-Naval-T-Shirt/Prod/pgeproduct.aspx?iid=2274815
[141] => http://www.example.com/mysite/mysite-T-Shirt-With-Floral-Pocket-And-Yoke/Prod/pgeproduct.aspx?iid=2199554
[142] => http://www.example.com/mysite/mysite-T-Shirt-With-Eagle-Sunset-Print/Prod/pgeproduct.aspx?iid=2198894
[143] => http://www.example.com/Death-By-Zero/Death-by-Zero-Primal-Urge-T-Shirt/Prod/pgeproduct.aspx?iid=2352921
[144] => http://www.example.com/Death-By-Zero/Death-by-Zero-Nights-in-Manhattan-T-Shirt/Prod/pgeproduct.aspx?iid=2353016
[145] => http://www.example.com/Death-By-Zero/Death-by-Zero-Hit-the-Ground-T-Shirt/Prod/pgeproduct.aspx?iid=2353013
[146] => http://www.example.com/River-Island/River-Island-T-Shirt-with-Jazzy-Jeff-Print/Prod/pgeproduct.aspx?iid=2367043
[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
[150] => http://www.example.com/Denim-Supply-by-Ralph-Lauren/Denim-Supply-by-Ralph-Lauren-Shield-Logo-T-Shirt/Prod/pgeproduct.aspx?iid=2214188
[151] => http://www.example.com/Clubbed-to-Death/Clubbed-to-Death-Tie-T-Shirt/Prod/pgeproduct.aspx?iid=2342946
[152] => http://www.example.com/Clubbed-to-Death/Clubbed-to-Death-RocknRoll-T-Shirt/Prod/pgeproduct.aspx?iid=2342949
[153] => http://www.example.com/Clubbed-to-Death/Clubbed-to-Death-Priviledge-T-Shirt/Prod/pgeproduct.aspx?iid=2343095
[154] => http://www.example.com/Clubbed-to-Death/Clubbed-to-Death-Ibiza-Rocks-T-Shirt/Prod/pgeproduct.aspx?iid=2342877
[155] => http://www.example.com/Clubbed-to-Death/Clubbed-to-Death-I-Heart-Cream-T-Shirt/Prod/pgeproduct.aspx?iid=2343085
[156] => http://www.example.com/Suit/Suit-Multistripe-T-Shirt/Prod/pgeproduct.aspx?iid=2245305
[157] => http://www.example.com/Suit/Suit-Marl-Stripe-T-Shirt/Prod/pgeproduct.aspx?iid=2245454
[158] => http://www.example.com/Suit/Suit-Block-Colour-T-Shirt/Prod/pgeproduct.aspx?iid=2245089
[159] => http://www.example.com/mysite/mysite-Stripe-T-Shirt/Prod/pgeproduct.aspx?iid=2250508
[160] => http://www.example.com/Worn-By/Worn-By-Rotten-Food-T-Shirt/Prod/pgeproduct.aspx?iid=2085029
[161] => http://www.example.com/mysite/mysite-Stripe-T-Shirt/Prod/pgeproduct.aspx?iid=2250577
[162] => http://www.example.com/Jack-Jones-Vintage/Jack-Jones-Vintage-T-Shirt/Prod/pgeproduct.aspx?iid=2217454
[163] => http://www.example.com/Minimum/Minimum-Maidai-T-Shirt/Prod/pgeproduct.aspx?iid=2243906
[164] => http://www.example.com/American-Apparel/American-Apparel-Oversized-T-Shirt/Prod/pgeproduct.aspx?iid=2339752
[165] => http://www.example.com/Selected/Selected-Jimmy-Hendrix-T-Shirt/Prod/pgeproduct.aspx?iid=2191026
[166] => http://www.example.com/mysite/mysite-Vest-With-Leaf-Print-And-Pocket/Prod/pgeproduct.aspx?iid=2261785
[167] => http://www.example.com/Insight/Insight-Giddget-Must-Die-T-Shirt/Prod/pgeproduct.aspx?iid=2045641
[168] => http://www.example.com/Religion/Religion-Bramford-Pocket-Vest/Prod/pgeproduct.aspx?iid=2304093
[169] => http://www.example.com/Religion/Religion-Legs-T-Shirt/Prod/pgeproduct.aspx?iid=2303942
[170] => http://www.example.com/WESC/WESC-Puzzle-Overlay-T-Shirt/Prod/pgeproduct.aspx?iid=2187520
[171] => http://www.example.com/WESC/WESC-Icon-And-Stripes-T-Shirt/Prod/pgeproduct.aspx?iid=2187451
[172] => http://www.example.com/Revolution/Revolution-Stripe-Pocket-T-Shirt/Prod/pgeproduct.aspx?iid=2247329
[173] => http://www.example.com/mysite/mysite-Stripe-T-Shirt/Prod/pgeproduct.aspx?iid=2250507
[174] => http://www.example.com/Religion/Religion-Striped-Vest/Prod/pgeproduct.aspx?iid=2303946
[175] => http://www.example.com/Religion/Religion-Square-Pocket-T-Shirt/Prod/pgeproduct.aspx?iid=2304086
[176] => http://www.example.com/Religion/Religion-Scream-T-Shirt/Prod/pgeproduct.aspx?iid=2303943
[177] => http://www.example.com/Religion/Religion-Rest-in-Peace-T-Shirt/Prod/pgeproduct.aspx?iid=2303852
[178] => http://www.example.com/Religion/Religion-Low-V-T-Shirt/Prod/pgeproduct.aspx?iid=2304183
[179] => http://www.example.com/Religion/Religion-Gradient-T-Shirt/Prod/pgeproduct.aspx?iid=2303945
[180] => http://www.example.com/Religion/Religion-Basic-Vest/Prod/pgeproduct.aspx?iid=2304260
[181] => http://www.example.com/Religion/Religion-Rumours-T-Shirt/Prod/pgeproduct.aspx?iid=2304269
[182] => http://www.example.com/Esprit/Esprit-Pocket-Marl-Crew-Neck-T-Shirt/Prod/pgeproduct.aspx?iid=2257627
[183] => http://www.example.com/Sin-Star/Sin-Star-Live-Fast-T-Shirt/Prod/pgeproduct.aspx?iid=2274387
[184] => http://www.example.com/Savant/Savant-Sofa-T-Shirt/Prod/pgeproduct.aspx?iid=2187666
[185] => http://www.example.com/Savant/Savant-Puzzle-T-Shirt/Prod/pgeproduct.aspx?iid=2187664
[186] => http://www.example.com/Your-Eyes-Lie/Your-Eyes-Lie-Navo-Vest/Prod/pgeproduct.aspx?iid=1996309
[187] => http://www.example.com/Your-Eyes-Lie/Your-Eyes-Lie-Navo-T-Shirt/Prod/pgeproduct.aspx?iid=1996212
[188] => http://www.example.com/Esprit/Esprit-Pocket-Marl-Crew-Neck-T-Shirt/Prod/pgeproduct.aspx?iid=2255386
[189] => http://www.example.com/Your-Eyes-Lie/Your-Eyes-Lie-Ethnic-Animal-Vest/Prod/pgeproduct.aspx?iid=1996312
[190] => http://www.example.com/Polo-Ralph-Lauren/Polo-Ralph-Lauren-Anchor-Print-T-Shirt/Prod/pgeproduct.aspx?iid=2192627
[191] => http://www.example.com/Savant/Savant-Hello-Boys-T-Shirt/Prod/pgeproduct.aspx?iid=2187661
[192] => http://www.example.com/Jack-Jones-Vintage/Jack-Jones-Vintage-Surf-Shop-T-Shirt/Prod/pgeproduct.aspx?iid=2217196
[193] => http://www.example.com/Replay/Replay-Replay-T-Shirt-college-logo/Prod/pgeproduct.aspx?iid=2117989
[194] => http://www.example.com/Esprit/Esprit-Reverse-Pocket-Stripe-Crew-Neck-T-Shirt/Prod/pgeproduct.aspx?iid=2183750
[195] => http://www.example.com/Sin-Star/Sin-Star-Kill-Graphic-T-Shirt/Prod/pgeproduct.aspx?iid=2274447
[196] => http://www.example.com/Sin-Star/Sin-Star-Destroy-Graphic-T-Shirt/Prod/pgeproduct.aspx?iid=2274445
[197] => http://www.example.com/J-Lindeberg/J-Lindeberg-Scoop-Neck-T-Shirt/Prod/pgeproduct.aspx?iid=2228059
[198] => http://www.example.com/J-Lindeberg/J-Lindeberg-Fine-Stripe-T-Shirt-with-Pocket/Prod/pgeproduct.aspx?iid=2227948
[199] => http://www.example.com/mysite/mysite-Vest-With-Eagle-Print/Prod/pgeproduct.aspx?iid=2099899
)
The array is obviously correct, or at least it is 200 elements long.
The problem then is that Laravel probably does not expect you to shoot output using echo or var_dump or print_r, and "directly output'ed HTML" is likely to smash against some kind of output processor unless you leverage Laravel's Logger class.
It might be a coincidence, but your output size seems to fall around 16 Kb, which is the preferred buffer size of several processors/beautifiers/HTML cleaners.
What happens if you array_slice, say, the first 20 elements off the beginning of your array? Do only 130 elements get displayed, or do you still see 150 (more or less) elements?
Edit: if you really have to use echo, print_r or any "non-Laravel" method to output something quick&dirty, you may almost certainly do it like this:
// Open another output buffering context
ob_start();
print_r($WHATEVER);
$_output = ob_get_contents();
// Destroy the context so that Laravel's none the wiser
ob_end_clean();
$_fp = fopen("/tmp/myfile.txt", "w");
fwrite($_fp, $_output);
fclose($_fp);
// Remove awkward traces
unset($_fp, $_output);
You may also encapsulate the last part into a function of your own, so that you can write
// in helpers.php
function myObStop($file, $mode = 'a') {
$_output = ob_get_contents();
// Destroy the context so that Laravel's none the wiser
ob_end_clean();
$_fp = fopen($file, $mode);
fwrite($_fp, $_output);
fclose($_fp);
}
ob_start();
print "Whatever";
myObStop('/tmp/myfile.txt', 'w');
and leave Laravel executing after that. But I strongly advise to exploit Logger instead:
http://laravel.com/docs/logging#logging
When I test arrays I use this.
I'm pretty sure this is a default helper function called: dd()
$array; // That is 200 elements long.
var_dump($array);
die(); // Prevents html from being rendered if executed in the controller or model.
Every time I try to do this in my view it gets messed up by the HTML like Iserni said.
If have and array like this:
Array (
[Example1] => Array
(
[0] => [1] => [2] => [3] => [4] => [5] => [6] => [7] => [8] => [9] =>
)
[Example2] => Array
(
[0] => [1] => [2] => [3] => [4] =>
[5] => [6] => [7] => [8] => [9] =>
[10] => [11] => [12] => [13] => [14] =>
[15] => [16] => [17] => [18] => [19] =>
[20] => [21] => [22] => [23] => [24] =>
[25] => [26] => [27] => [28] => [29] =>
[30] => [31] => [32] => [33] => [34] =>
[35] => [36] => [37] => [38] => [39] =>
[40] => [41] => [42] => [43] => [44] =>
[45] => [46] => [47] => [48] => [49] =>
[50] => [51] => [52] => [53] => [54] =>
[55] => [56] => [57] => [58] => [59] =>
[60] => [61] => [62] => [63] => [64] =>
[65] => [66] => [67] => [68] => [69] =>
[70] => [71] => [72] => [73] => [74] =>
[75] => [76] => [77] => [78] => [79] =>
[80] => [81] => [82] => [83] => [84] =>
[85] => [86] => [87] => [88] => [89] =>
[90] => [91] => [92] => [93] => [94] =>
[95] => [96] => [97] => [98] => [99] =>
[100] => [101] => [102] => [103] => [104] =>
[105] => [106] => [107] => [108] => [109] =>
[110] => [111] => [112] => [113] => [114] =>
[115] => [116] => [117] => [118] => [119] =>
[120] => [121] => [122] => [123] => [124] =>
[125] => [126] => [127] => [128] => [129] =>
[130] => [131] => [132] => [133] => [134] =>
)
)
There's is 2 primary arrays (Example1 & Example2) and in those another array is made. I would like to know how I can only call only 1 array like "Example2" so it print only that one and ignore "Example1"
Please note that there could be more than 2 primary arrays.
And what if with that array I want to build a drop down menu, here what I have:
$__selectGroups = '';
foreach ($groups as $key => $options)
{
sort($options);
if ($key !== '')
{
$__selectGroups .= '<optgroup label="'.$key.'">';
}
$__selectGroups .= implode("\n", $options);
if ($key !== '')
{
$__selectGroups .= '</optgroup>';
}
}
How can I tell to build the drop down with only Example2 and ignore the others?
I'm not sure I understand the question... seems too simple:
print_r($yourArray['Example1']);
Since you edited your question, I think you want to do this?
foreach ($yourArray['Example1'] as $key => $value) {
}
This paradigm for accessing nested arrays applies across the board...
You need something like this:
echo '<pre>';
print_r($yourArray['Example1']);
print_r($yourArray['Example2']);
echo '<pre>';
Or you need something more elaborated?