Normally when I want to pull a variable that is outside the class, I use global $variavel , but I wanted this variable to be accessible in all functions of the class, so I do not need to "pull" all the functions, how?
As by C # in WindowsFormsApplication call a function from a php page and pick up the value from it, eg:
page php:
function retornar()
{
$valor = "aa";
return $valor;
}
In case I would like to call this page through C # and assign a val...
What does the ?: operator mean in PHP?
Example:
$a = 0;
$b = false;
$c = 3;
echo $a ?: $b ?: $c;
Result:
3
What exactly is it doing in the above expression?
Is this a ternary? If not, what do you call this operat...
I'm having a question regarding preg_replace , I'd like to know how I could do to only allow numbers, and hyphens ( - ).
My code is as follows:
$ola = preg_replace('/[^[:alnum:]_]/', '',$_POST['ola']);
How can I do just numbe...
I have a form that, after being submitted, displays the result on a second page, type:
<form method="post" id="form" action="form.php">
<input name='nome' id='nome'>
<input type='submit' value='Enviar'>
</form>
And n...
Good morning
I have the result in MYSQL
01
03
04
06
11
I need a solution that fills in 2 zeros where it loses the numerical sequence up to number 12.
Example:
01
00
03
04
00
06
00
00
00
00
11
00
Looking at questions here from the stack and the php.net site, I saw that the query / function runs in MySQLi uses if() to check whether it was executed or not, and PDO uses try { ... } cacth() { ... } , example connection to bank ac...
I have a table, I want to load the page with its hidden content, and when I click on the title (in the example below waiting ), load the content and click on the title again the content is collected and hidden.
How can I do this?
<...
I have a registration form, and I would like you to let me know as soon as the email is entered, if it is already in the database.
I thought of using a JavaScript function with a PHP code inside that will search if there is email in the Ban...