Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

phpstorm using extract to create variales

   public function db(){
    $db = new SQLite3('db/mysqlitedb.db');

    $payments = $db->query('SELECT * FROM payments');

    while ($pay = $payments->fetchArray()){
        /**
         * @var string $to_user
         * @var string $from_user
         * @var number $amount
         */
        extract($pay);
        if (isset($to_user, $from_user, $amount))
            echo "TO: {$to_user}| FROM: {$from_user}| $ {$amount} 
";
    };
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #phpstorm #extract #create #variales
ADD COMMENT
Topic
Name
8+3 =