1

I want to fetch the text inside last div. I have tried something below as well

$html = $crawler1->filter('span[id="verisysForm:cnicStatusPanel"]')->text();  // returns empty

Here is the structure from where i want to get text.

<span id="verisysForm:cnicStatusPanel">   
   <span style="border: none;background-color: #FFFDFA;">
      <div class="row">
        <div class="col-md-12" style="padding-top: 30px">
            <div style="text-align: left;  border-radius: 10px;background-color: #E9F5DE;background-color: #d9edf7;padding-top:19px;">
                <div style="text-align: left;padding-left: 10px;font-size: 18px;font-family: calibri; color: black;padding-bottom:10px;">
                  The Card: 123456789 and issue date: 1999/10/08 is currently INACTIVE.  However, another card has been issued in lieu of this card. 
                </div>
            </div>
        </div>
    </div>
</span>
</span>
Aqib Javed
  • 935
  • 1
  • 5
  • 15
  • I think that [strip_tags()](https://www.php.net/manual/en/function.strip-tags.php) would do the job, since there's no other text present in your HTML. – KIKO Software May 23 '22 at 07:51
  • when i try " $crawler1->filter('span[id="verisysForm:cnicStatusPanel"]')->html() " it also return empty. – Aqib Javed May 23 '22 at 07:56

0 Answers0