I would like to dynamically create a array , I tried this way:
$zt = array();
$zt = ($p_p[0] => $_p_p[1]);
print_r($zt);
$p_p is an array , where index 0 is the name, and index 1 is the value, 2 name, 3 value ..
$p...
I am a beginner in Kohana and need to make a form with a date field. My form is this:
<?=form::open('controllerInscricao/index')?>
<?php echo form::select('TURMA_codturma', $TURMA_codturma); ?> <br><br>
<div>Matr...
Good afternoon!
I have the following problem, I have to withdraw reports from a certain database where I should select specific employees, the same should be selected from a combobox:
<select name="usuario" id="usuario">
&l...
I have the following function that is used to take special characters from a string:
function removeSpecialChars($string){
//List (Array) of special chars
$pattern = array("/(á|à|ã|â|ä)/","/(Á|À|Ã|Â|Ä)/","/(é|è|ê|ë)/","/(É|È|Ê|Ë)/","/(í|ì|...
I was developing a web service with laravel, and I realized that I can save the data in my bank in two ways:
Product::create($request->all());
or else:
$product = new Product();
$product->fill($request->all());
$product->save(...
I fed this chart
ButIhaveaprobleminselectingit<?php$sql_2_vis=mysqli_query($config,"SELECT data, uniques, pageviews FROM tb_visitas ORDER BY id DESC LIMIT 7") or die(mysqli_error($config));
if(@mysqli_num_rows($sql_2_vis) <= '0'){...
I made the following function in php that receives a string, and returns a new string containing only the numbers of the received string.
I just can not concatenate each number to this new string. I've tried the following:
function extraiSo...
Someone knows how I can do a single serial system in a way that never repeats the same serial, I heard that with rand and md5 to do but I'm not sure that one hour it will not happen again.
I have 2 classes in PHP, Product and Category.
Following the code for each.
Product.php
class Produto {
public $nome;
public $categoria;
}
Category.php
class Categoria {
public $nome;
}
In this case, what I just wa...
I'm creating a function that returns the alphabet in an array according to the size of passed columns.
At first I was only looping using the range ("A", "Z"); but when I had more than 26 columns I did not answer any more, what I found was a...