problem with converting array, implode function doesn’t work

Hi i'm trying to convert array values to simple strings but i can't. I tried the function implode (), serialize (), join (), but nothing I can't. This is the array values (hyperlink) that i want to convert into text.

enter image description here

This is my full code:

$dom = new DOMDocument;
$xpath = new DOMXPath($dom);
$texts = [];
$count = 0;
foreach ($xpath->query("//table[contains(@class, 'troop_details') and contains(@class, 'inReturn')]") as $table) {
  $tablePath = $table->getNodePath();
   $texts[] = [
        $xpath->query($tablePath . "//td[@class='troopHeadline']//a[@href]/text()")[0]->nodeValue
  $orario[] = [
        substr($xpath->query($tablePath . "//div[@class='at']/span[starts-with(text(), 'at')]/text()")[0]->nodeValue, -8)
$count = $count + 1;

<table width="350px" border="1">

for ($i=0; $i<$count ; $i++) { ?>
<tr><td><?php $stampa_stringa = implode($texts[$i]);
echo $stampa_stringa; ?>
<td align="center"> <?php $stampa_orario = implode($orario[$i]);
echo $stampa_orario; }?>


Read more here:

Content Attribution

This content was originally published by Luigi at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: