How to organize array index of 2nd dimension?
Search
$stmt = getConn()->query("SELECT hash,id,quantidade FROM pergaminhos");
$resp = $stmt->fetchAll(PDO::FETCH_GROUP|PDO::FETCH_COLUMN);
response
Array
(
[1] => Array...
I have a layered system.
I'm using MVC and inside the MODEL folder I have a DAO folder.
Let's say I have a file named Professor_DAY and another called
Aluno_DAO.
Question: Can I include the student file in Teacher to call any method presen...
I want something to print on the screen at runtime, not just when the script is finished, I tried:
<?php
ob_start();
for($i = 0; $i < 5; $i++){
echo $i . '<br>';
ob_flush();
flush();
sleep(3);
}
but did not work,...
I'm having a hard time. I am not able to scan the XML file and change the values of the tags that I need, they are NOTA and SERIE . I have to replace these tags with new values, does anyone know how to do this? I researched, but the...
I have a .txt file. It has the name of the images and the description about them. So I wanted to do it like this:
nome:descrição
imagem1.jpg:"descrição exemplo 1";
I know how to read the php file. Now I wanted to separate the information, b...
So I was browsing through php.net when I came across List () and went to see what it was for. Then they gave me the following example:
$info = array('Café', 'marrom', 'cafeína');
list($bebida, $cor, $substancia) = $info;
echo "$bebida é $cor e...
I was asked for a project, to make monthly consultation of IPCA and SELIC rate, from a central bank API. I wanted to know where I could find this API, because I found nowhere, nor the site itself.
I know that it is not mandatory to use the inc and class codenames in the name of the files, but for the sake of organization it is even recommended.
The doubt is due to the fact that the class codename is easy to underst...
When I give the command: echo ini.get('date.timezone') . "<br>"; nothing appears, I already configured it in php.ini and nothing, I also already put the default in the code and nothing too. Can anyone help me?