Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php variable undefined inside function argument

    <?php
    // $ime=$_POST["ime"];
    // $prezime=$_POST["prezime"];
    $pera="string";
    $prezime = "Ne radi, vrati se nazad i unesi nesto!";
    // if (empty($ime)||empty($prezime)){
    //     echo "Ne radi, vrati se nazad i unesi nesto!";
    // }
    $provera = function ($prom) use ($pera) {
        if (preg_match("/[0-9,.?>.<"':;[]}{/!@#$\%^&*()-\_=+`[:space:]]/",$prom)){
            echo "Nepravilan unos imena ili prezimina!";
            echo $pera;
        }
    };

    // $provera($ime);
    $provera($prezime);
Comment

undefined variable inside function php

$myId = 0;
function run(){
  global $myId;
	echo $myId;
}
Comment

PREVIOUS NEXT
Code Example
Php :: laravel get fetch api request body 
Php :: ?? operator in php laravel 
Php :: prestashop get product id 
Php :: hide .php 
Php :: php mysql row to json 
Php :: timestamp in model laravel 
Php :: combine date time php 
Php :: wordpress programmatically change slug of media attachment site:wordpress.stackexchange.com 
Php :: change email to username laravel login 
Php :: how to unhash password_hash in php 
Php :: php abstract class static method 
Php :: how to grab shortcode from custom post type 
Php :: wp-admin File not found (404 error) 
Php :: doctrine update entity 
Php :: php mask credit card number 
Java :: hello world java 
Java :: java get next enum 
Java :: left fold java 
Java :: full screen in jframe 
Java :: phone call using intent in Android 
Java :: java int to roman 
Java :: how to generate random numbers in java within range 
Java :: transparent dialog in android 
Java :: list to int array in java 8 
Java :: recyclerview snaphelper callbacks android 
Java :: join array java 
Java :: how to implement linked list in java without using collection framework 
Java :: java calculate fps 
Java :: How to make a countdown timer in Android? 
Java :: java stream collect to string 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =