Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/06/2020 in all areas

  1. This is what I do... config.php <?php return [ 'charset' =>'utf8mb4' , 'name' =>'exambuilder' , 'username' =>'root' , 'password' =>'' , 'host' => 'localhost' , 'options' =>[ PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION , PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC , PDO::ATTR_EMULATE_PREPARES => false ] ] somefile.php <?php $config = require 'config.php'; echo $config['username']; You could also use dotenv like Laravel https://github.com/vlucas/phpdotenv
    1 point
  2. However, using the string just as far as the the first entity $valrD = json_decode(valrGet, true); echo '<pre>$valrD = ', print_r($valrD, 1), '</pre>'; gives therefore $target = 'BTC/ZAR'; foreach ($valrD['response']['entities'] as $k => $ents) { if ($ents['pair_name'] == $target) { echo "$target asking price : {$ents['ask']['price']}<br>"; break; } } outputs "BTC/ZAR asking price : 179382.54"
    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.