Questions tagged as 'php'

1
answer

preg_match_all (): Delimiter must not be alphanumeric or backslash

class Check { private static $Data; private static $Format; public static function Email($Email) { self::$Data = (string) $Email; self::$Format = "/[a-z0-9_\.\-]+@[a-z0-9_\.\-]*[a-z0-9_\.\-]+\.[a-z]{2,4}$/";...
asked by 13.12.2016 / 23:33
2
answers

Group table data with two columns

Well, I'm in an incognita I'd like to solve directly in the SQL query, see this supposed example: TIPO | DE | IDENTIFICADOR ------------------------- 001 | 23 | 9 001 | 44 | 9 001 | 23 | 8 002 | 11 | 11 I want to group the data in ord...
asked by 15.11.2016 / 22:00
2
answers

Find duplicate values in an array

I have foreach and it has the same results, I want it when it has the same result it makes a echo Code sample: $courses = array('teste', 'teste2', 'teste3', 'teste'); foreach ($courses as $key => $course) { if ($course...
asked by 01.11.2016 / 19:53
1
answer

Download failure when trying to update plugins in Wordpress

I installed Wordpress locally, installed some plugins and now I'm trying to update the translations. What happens is that it does not update. Note: use EasyPHP and WP 4.6.1 It displays the following message:    Download failed. No wor...
asked by 03.12.2016 / 14:19
1
answer

How to shuffle this array inside itself? [duplicate]

$img = array ( array("1.jpg","Logo","Tigre"), array("2.jpg","Logo","Cão"), array("3.jpg","Logo","Montanha"), array("4.jpg","banner","Design Grafico"), array("5.jpg","Logo","Dentista"), array("6.jpg","Logo","Basketball") ); I...
asked by 18.11.2016 / 01:06
2
answers

Help with mysql curdate () - 1

I'm getting this error:    # 1064 - You have an error in your SQL syntax; I have tried it in many ways, but it always gives this error. Here are two of my attempts: SELECT 'category'. * , 'event'. * FROM category, event WHERE 'categ...
asked by 23.11.2016 / 16:05
4
answers

How to change the date order of an implode coming from a jquery datepicker

I have the following $ _get: if(!empty($_GET) && $_SERVER['REQUEST_METHOD'] == 'GET'){ $v_ocorrencia = $_GET['ocorrencia']; $datainicio = $_GET['datainicio']; $datafinal = $_GET['datafinal']; echo 'valor recebido: '. $v_o...
asked by 01.11.2016 / 20:07
1
answer

Pass PHP variable to Python with more than 14 characters

Problem passing Python variable to PHP with more than 14 characters PHP code $p = 123456789101112 $pyscript = 'C:\Users\python\teste.py'; $python = 'C:\Python34\python.exe'; $run = shell_exec("$python $pyscript $p"); Python code im...
asked by 20.10.2017 / 00:42
3
answers

Sort array by itself within the index in PHP

I'm working with the datatables, and by chance I decided to use the function ajax of it, I did the whole process, but one thing is missing, I can reorder the array, because using processing server-side dataTables does not intera...
asked by 19.10.2017 / 19:06
2
answers

How to extract and list values from a multidimensional array?

I have this array: Array ( [Bairro] => Array ( [0] => Aberta dos Morros [1] => Camaquã [2] => Cavalhada [3] => Cristal [4] => Guarujá [5] =...
asked by 03.01.2016 / 03:19