PHP expert needed - simple job

Job ID: 34612342

Budget: £10 – £20 GBP

Hello please see my code. the balance variable will not echo out. Looking for someone who can fix asap.

$wallet = mysqli_real_escape_string ($mysqli, $_POST['wallet'] );

use Goutte\Client;
use Symfony\Component\HttpClient\HttpClient;

require "vendor/autoload.php";

$client = new Client(HttpClient::create(['timeout' => 60]));
$crawler = $client->request('GET', 'https://bscscan.com/token/0x9C65AB58d8d978DB963e63f2bfB7121627e3a739?a='.$wallet.'');

$crawler->filter('#ContentPlaceHolder1_divFilteredHolderBalance')->each(function ($node) {
$text = $node->text();
$text = str_replace("Balance ","",$text);
$bal_arr = explode(".",$text);
$balance = $bal_arr[0];

});


// if i echo $balance here it wont display due to crawler code above //
// need balance variable here
Related categories: PHP JavaScript Software Architecture Zend MySQL