I need to write data to a database, and if it succeeds, then I will generate a .pdf with PHP.
Even though I put try catch in a part of the code and it gives exception , still the rest of the code will be executed. Would it...
I was looking at how the strtr and str_replace functions behaved and I noticed that, at first glance, the two seem to do exactly the same thing.
Example:
$translators = [
'da hora' => 'bacana',
'ser' => 'é',
];
$st...
In PHP, I've read and heard many times about Language Builders. The cases I've heard of them have been in cases where it was said "you'd rather use X instead of Y, since Y is a function and X is a language constructor."
One of the cases I've...
In the Inphinit micro-framework there is the Model folder that is inside the application , and that's where classes , but I'm very confused about these classes.
View a class inside the Model folder:
<?php
namespace Model;
class User...
I have two codes, the first one uses spl_autoload_register and the other does not, however the second one loads "automatically the class" as well.
With spl_autoload_register
Uses namespaces to split MVC
You can create multiple le...
I have a project where I must accumulate hours worked for a service in a project, it should store in the bank the hours / days.
Then when started, if there is no previous time it starts from zero, but if there has already been a step previous...
To have problems with the accents in my code and wanted to remove the accents when doing the search,
Ex:
Search: Hello | Hello.
When doing a Music search on the site it returns the url like this:
search.php? q = Music
And it does no...
How can I make a explode in a variable where I can then access it by nominal index , and not by numeric index ?
Follow the example to get clearer:
<?php
// Aqui acesso pelo índice
$user = "Diego:25:RJ";
$info = explode(":",$u...