Questions tagged as 'php'

1
answer

1st becomes 1 when I enter json

When I enter 1ª in JSON with codeigniter, when I convert it into string it will 1\u00aa . $t[0]["teste"] = "1ª"; $data[0]["algo"] = $t;     
asked by 26.06.2017 / 23:40
2
answers

How to sort the position of a matrix automatically?

Example, I have: $matriz = array("Tomate", "Morango", "Melancia"); I would have: ( [0] => Tomate [1] => Morango [2] => Melancia ) But if I do: unset($matriz[0]); I'll have: ( [1] => Morango...
asked by 24.06.2017 / 03:16
1
answer

Bring results from two tables (INNER JOIN error)

I have the secretaries table with the following structure: Andtheworkertablewiththefollowingstructure: Ilinkedtheworkertabletothesecretariestablethroughthefollowingrelation: That is, I'm relating the Foreign key to the 'worker' table's pri...
asked by 25.06.2017 / 20:55
1
answer

I have a question regarding the installation and configuration of composer (PHPUnit)

I'm doing a project at the Federal Institute of Triangulo Mineiro, about a student control system made in php, so I'm starting a test phase using PHPUnit and I have my doubts because I'm not experienced with this tool. I'm not able to install an...
asked by 25.05.2016 / 21:31
1
answer

Pass an array of one query to all Codeigniter pages

It has a view that repeats itself in all the others through a $this->load->view('menu'); would I have a way to load the dynamic menu query in all other views with the above line? If I do this on all controllers, of course it's true:...
asked by 31.05.2016 / 19:20
1
answer

When to use Exceptions in PHP?

I came up with a module of the PHP OOP handout on Handling Exceptions , I practiced the exercises and such, but I'm still not quite sure when to use them, and why. I ran a search and found this:    link and this    link T...
asked by 10.02.2016 / 23:41
1
answer

How do I make a friendly url in PHP [duplicate]

I know you've asked before and you have several answers on the internet but none have solved my problem. I have a whole site in php, with several pages and would like to make url friendly to their variables. I wanted, for example, to let index...
asked by 09.02.2016 / 16:36
2
answers

Return Json from php to jquery ui

I have a code in php that does a return of data in JSON. When it has only one value it returns as it should:    ["[email protected]"] When more than one value is found it returns as follows:    [ "[email protected]", "ezekielEBurt@d...
asked by 11.02.2016 / 11:42
2
answers

Load a combobox by selecting another combobox

When returning the values in the combobox, it is returning as undefined: include 'relacao-cidades.php'; And just below the combobox that I want to load the states according to the selected city: <select name="Estados" id="CmbCidade" c...
asked by 09.02.2016 / 19:11
1
answer

Grid Skeleton Responsive with Wordpress

Next I'm building a website that needs to show posts with wordpress, however I'm using the Skeleton grid framework, it works as follows: <div class="container"> <div class="row"> <div class="three columns"></div...
asked by 12.02.2016 / 04:58