Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/17/2021 in all areas

  1. The only difference that missing </div> makes is that the second find() returns the text up to the next </div>, thus giving $name = "Name: madac" $age = "Age: 18 <div class='man'>Class: 12</div> " $cls = "Class: 12" So you just need to look for and trim off the excess "<div> ... </div>" Perhaps... $html = str_get_html('<div> <div class="man">Name: madac</div> <div class="man">Age: 18 <div class="man">Class: 12</div> </div>'); $name = trim_html($html->find('div[class="man"]', 0)->innertext); $age = trim_html($html->find('div[class="man"]', 1)->innertext); $cls = trim_html($html->find('div[class="man"]', 2)->innertext); function trim_html($str) { if ( ($p = strpos($str, '<')) !== false) { $str = substr($str, 0, $p); } return trim($str); }
    1 point
  2. You cannot browse to /test2 with your address bar. It is only accessible by POSTing an HTML form.
    1 point
  3. ...except when you use get? I am not "laravel literate" but aren't these using "get"? ...
    1 point
  4. But something is trying to use GET. You do not support it, which is why there is an error, but something is trying. The error message. How did you get it to happen? What did you do to see it?
    1 point
This leaderboard is set to New York/GMT-04:00
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.