I have the following array
$array = [25, 'Wallace', '26 anos', 'linguagens' => ['PHP', 'Python', 'C#']
I would like to use the list function to capture some elements directly in variables, like this:
list($id, $nome, $...
To know IPv4 I can use the code on a page:
<?php
echo $_SERVER["REMOTE_ADDR"];
?>
But I can not find anything similar to do the same with IPv6, which appears to me a lot is already sites with converters.
Even though there is no...
I'm trying to send an email via PHP with HTML attributes, an email formatted with images and styles. I have tried using PHPMailer, but without success, I have used PHP's mail () function that meets my needs and sends the email without many probl...
Is there a function in PHP to find out if an IP address (ie website) is in the air or not?
I found this function in WEB but it did not satisfy me .... it takes a lot to load.
function curl_info($url){
$ch = curl_init();
curl_se...
I need to develop an algorithm that finds a specific value of the sum of some elements of an array. Ex: I have an array with 50 distinct values and I have a given value "X" .
I know that the sum of the combination of some elements of this...
I have an HTML page with an e-mail submission form. I need to check on the same page whether the fields were filled out or not at the time the user clicks the Submit button.
Apparently it is bypassing the javascript function and it is sending th...
I created a registration system and wanted to know how to make the information that was registered appear on the page and that the user can edit it. Follow my code below.
<body>
<form action="" method="POST">
<label><br /&...
I have an ajax request that sends a large object. That in the browser console is seen like this:
Object {data: Array[4936], paging: Object}
The following is the requisition code:
$.ajax({
type: "POST",
url: "gerararquivo.php",...
How, after telling how many records I have in a database, how do I put the value inside a PHP variable:
$sql = mysql_query("SELECT COUNT(*) FROM 'users'");
$row = mysql_fetch_array($sql);
$total = $row['COUNT(*)'];
I managed to do what I w...
I'm getting a file in PHP.
$arquivo = file_get_contents($_FILES['arquivo']['tmp_name']);
I want to know how do I get this file and put it in an array for every line break that it finds \ n .
For example:
Nome 1
Nome 2
Nome 3
Nome 4...