I have created some rules in my .htaccess file to format the URL view, but I am having difficulty passing the parameter to the page that shows the products and show formatted, the code looks like this:
RewriteEngine On
RewriteRule ^P...
The documentation on this is rather vague, the little that exists does not clearly clarify the difference between the use and purpose of the following two PHP constants:
PATH_SEPARATOR
and
DIRECTORY_SEPARATOR
At first glance, it seems...
I've always been used to using isset to check if an external variable is populated and if you're using it.
Example:
if(isset($_GET['pag']))
$pag = $_GET['pag'];
Now I've installed NetBeans and give me a Warning to say t...
What is the ~ (useful) operator in PHP?
I have seen things like:
echo ~PHP_INT_MAX
Until then I thought it was to "reverse" a negative number or something, but with the tests I saw that I was wrong.
Example:
echo ~2; //Imprim...
Browsing the internet looking for challenges (to be solved with programming), I found the "Thirteen men and a load", where said to be part of the NSA's random challenges (link ).
The challenge :
After your last trip, the 13 pirates of...
I'm doing the translation of a book to an HTML page, there in the book have the codes, but how do I make my HTML display my code, HTML, PHP and JavaScript without running them?
I am making a query to DB, and I want to receive results for the last 7 days from the current date. For this, I have a data field of type DATA (yyyy-mm-dd) in the table. I'm doing the query in php, mysql turn.
$query = mysql_query(SELEC...
I was checking out the New Features of PHP 7 and I came across an operator, which I had never seen in any programming language. The PHP Manual has demon- strated it from Spaceship Operator .
I'll show you what I've seen below:
echo...
How to humanize a date in PHP? For example, from that date 2015-08-20 , I want the function to return Há uma semana , because it's strange to read something like foi publicado há 754 dias or publicado há 38 semanas .
...