Questions tagged as 'php'

1
answer

Using preg_match_all () in an Array (Notice: Array to string conversion in) php

I'm looking for help to resolve the message:    Notice: Array to string conversion in <?php $response = '{"data":[{"access_token":"EAAby7f21xKABALPCThZC63i4LZAHZC7MaYbQ0E5gN","id":"515968102105625"},{"access_token":"EAAby7f21xKABAK0zyf...
asked by 17.11.2017 / 06:02
1
answer

Convert a logIn to logOut after login (without changing page)

I have an html page and what I want is that when logging in on the same page, the logIn link is hidden and the logOut appears. How could I do it? <div id='page-wrap'> <header class='main' id='h1'> <span class="right"><a hr...
asked by 13.11.2017 / 21:14
2
answers

Delete an item from a Collection

I have a Collection that comes to me from the route. This Collection has a relation, detalle , which is where I want to eliminate one of the objects that arrive, exactly the "qdet_ref" => "300_1_2" . At another time...
asked by 07.03.2018 / 12:59
1
answer

Apply filter in related tables laravel

Laravel's version is 5.4 Here I put the link of the project to download (Includes database to import, this in App / filtros_laravel.sql) link I will give a description of the problem. Let's start with the tables first. create table cl...
asked by 02.06.2017 / 05:22
1
answer

Send ssh command via php with submit button

My problem is the following one I have a form which it sends by means of the ssh2 command of php5, the restart or restart to a mikrotik by ssh, what I want is that this button is only allowed to click once every 10 seconds and that when I think...
asked by 02.06.2017 / 06:08
1
answer

Ontener Dailymotion video id with PHP API

I'm using the dailymotion API to upload videos but I want to get the id of the newly uploaded video but I do not know how to do it. Could someone help me? I have this code: $api->setGrantType( Dailymotion::GRAN...
asked by 02.06.2017 / 02:44
1
answer

See if there is an image and put it in a news item

I'm doing a very simple "news load" and when I speak of simple, believe me it's very simple ... I have a table where I load the titles, and a little picture on the left and a summary. It has more to the right a button where the user enters to re...
asked by 05.07.2017 / 17:14
1
answer

Problem with text file and PHP

Text and PHP files: How do I automatically display the message I just sent via POST on the same page? here is my code: <html> <head> <title>mboard</title> </head> <body> <?php $myfile = fopen("mboa...
asked by 06.07.2017 / 17:34
2
answers

rotate elements of an array with a fixed position

I have this array $a = Array("a","b","c","d"); I want to rotate b, c, d. That is, B is placed where d and the position is lowered. Example: abcd acdb adbc I've been here for the moment. $a = Array("a","b","c","d"); print_r($a); $n...
asked by 06.07.2017 / 12:00
1
answer

Create query without repeating column value

I am trying to make a query in which a value is not repeated since it is repeated several times. In my database, I have these data: How can I generate a query so that the value of emitter is not repeated? For example, do not repeat the...
asked by 29.06.2017 / 02:53