Questions tagged as 'php'

2
answers

Get the current week starting on Monday with php

I have the following question, how to get the current week starting on Monday, I am using the function $week = date('W','02/05/2017'); but it happens that when it is Sunday it shows me the following week, that is if I am in week 5, when i...
asked by 30.01.2017 / 22:26
1
answer

Get all matches between 2 fixed texts

I am using regex to get all search results on a page: <div class="col-xs-6 col-sm-4 col-md-4 col-lg-4">(NÚMERO ILIMITADO DE CARACTERES)</div> At first I think I have it right, but it does not work for me. $regex = '/\<div c...
asked by 17.12.2016 / 10:11
1
answer

Doubt of foreach in php

I have a question about filling a table through an array with a foreach. If I do it without a function, it does show me the expected result, but what I want is to use it as a function. For the moment I left it like this: <?php require_on...
asked by 17.12.2016 / 09:21
1
answer

PHP Slim Get POST parameters

I need to get the post parameters with slim framework php, this is my post route: $app->post('/agregar', function ($req, $res) { //obtiene e bodyParsed $data = $req->getParsedBody(); //aca se puede aplicar un forEach para sac...
asked by 03.12.2016 / 13:02
1
answer

Go from variable to modal

In my view I have a foreach to bring all the results of a query. And two buttons one to open a page related to its id and another button that opens the id in a modal. The first button works well since when you print each foreach the path to the...
asked by 01.12.2016 / 17:23
1
answer

Column name to first field of a csv

I have a code that allows me to export information from a table in my database, but I would like it that every time you export to the file, put the name of the column. <? if($_POST[exportar] == "expbas"){ $consulta = "SELECT *...
asked by 01.12.2016 / 21:34
2
answers

Place an image in PHP excel With an external path

I have the following code to insert an excel image, which works correctly: $objDrawing = new PHPExcel_Worksheet_Drawing(); $objDrawing->setName('imgNotice'); $objDrawing->setDescription('Noticia');...
asked by 01.03.2017 / 16:46
1
answer

Declare the same service in several bundles

Good morning everyone. I am developing an application using Symfony 2.8 exactly and I have a question about how to organize the declarations of my entity normalization services. I do it in this way to be able to parse JSON in a comfortable and c...
asked by 24.11.2016 / 08:25
1
answer

Socialite with facebook error when logging in after registering

I was using Socialite for Laravel and I always get an error after trying to log in the newly registered user. If I update the page and I want to log it, it works perfectly. But it fails to register and then log in automatically. User.ph...
asked by 19.11.2016 / 20:16
2
answers

Create pop up with bootstrap help

I am creating a "pop up" type pop-up window (as if it were a confirm () but I want instead of having the typical OK-Cancel buttons, have the values: Button1 - Button2, and each do X code. .. I have the following code in the index.php: echo...
asked by 17.11.2016 / 14:17