Posts by Jhonata De souza • 96 points
7 posts
-
-3
votes1
answer42
viewsA: Converting total hours of a month into days and hours
Hello! There is probably a simpler solution but I leave it to you to think or solve your problem temporarily: $hora = 0; $dia = 1; $horas = 734; // horas pre definidas // cria um array associativo…
-
-1
votes1
answer39
viewsA: Take data from a JS and display with PHP
Hello! See if this code works: $texto = file_get_contents('http://www.lotterytaiwan.com/intl/BR/results.js'); $filtro = strchr($texto, 'var draw_BRMS=new Array('); //procura a string $item =…
-
-1
votes2
answers39
viewsA: Match the Arrays
Hello! I believe this algorithm solves your problem: $cor = "Preto Branco vermelho azul rosa amarelo"; $cor = explode(" ",$cor); $arr = []; //verifica se é par if(sizeof($cor)%2 == 0) { for($i = 0;…
phpanswered Jhonata De souza 96 -
-1
votes3
answers45
viewsA: Symfony Component Httpkernel Exception Methodnotallowedhttpexception The PUT method is not supported for this route. Supported methods: GET, HEAD, POS
Hello! I believe he is waiting for the ID argument, which you are passing but is not identified as inside the form: //Form <form action="{{route('Update.afiliados', ['id' => $users->id])}}"…
-
0
votes1
answer27
viewsA: Copy id with 2 Insert
Hello! You can recover the Insert ID using the function insert_id $query_comodos = "INSERT INTO `img_comodos`( `id_user`, `id_anuncio`, `img_file`) VALUES ('$id_user_anun', '$img_final_comodo')";…
-
1
votes2
answers52
viewsA: How to take data from within a foreach array in php
Hello! I managed to run calling the reference by Brackets $i = 1; foreach($dates as $key){ echo 'data_' . $i . ' ' . $key->date . '<br>'; echo 'quantidade_'. $i . ' ' .…
phpanswered Jhonata De souza 96 -
2
votes2
answers58
viewsA: Error when registering.php with mysql (final step) "INSERT"
$cadastro = mysqli_query($con, "INSERT INTO usuarios (nome, senha, email) VALUES ($nome, $senha, $email)"); VALUES fields need to be in single quotes INSERT INTO users (name, password, email) VALUES…