Skip to content

Tag: php

Make A Dynamical Model With Join CodeIgniter

I asked this question yesterday but it got deleted because admins said it got similar question with other post but when I check it there it doesn’t have the same problem with me, so ill ask again and hope that admin can understand. I have this model in CodeIgniter: It has a parameter that I can use dyna…

Uploading PDFs to a directory PHP

I’m uploading PDFs to a directory and my script works fine for one directory but I’m having troubles coming up with a way to write the script efficiently when I have more then one directory to upload PDFs on a page. I know of a few ways I can do it, like write another function like below but there…

MySQL SELECT in order of array values

Can anyone help me with a Query query? I have an array of IDs $IDvalues = array(“128”, “159”, “7”, “81”, “82”, “83”); And need to retrieve data from another table in the order of the array. At the moment, I have this query: But it’s…

PHP array sort one item but leave rest in same order

I have a simple PHP array that looks like this… I am trying to sort this array by putting id 88 at the top but leaving the order the same for everything else. So I end up with… I had though about looping through the array first and removing the item with id 88 and then aftwrard reinserting it at