Skip to content

Tag: php

how to include js file in php?

I have a problem with an js file in php. if i include it like this: the file isn’t included and i get an error that the function isn’t defined. When i try it this way: the first tag in the document.write function closes <script type=”text/javascript”> what is the correct way to d…

How do I remove quotes from a string?

How to remove all types of quotes (different languages) from $string? Answer I assume you mean quotation marks? Otherwise, go for some regex, this will work for html quotes for example: C-style quotes: CSS-style quotes: bash-style quotes: Etc etc…

PHP passing $_GET in the Linux command prompt

Say we usually it access via How do we execute the same on a Linux command prompt? But what about passing the $_GET variables? Maybe something like php -e index.php –a 1 –b 2 –c 3? I doubt that’ll work. Answer Typically, for passing arguments to a command line script, you will use eith…

MySQL sorting single field in multi orders

hi i am trying to sort a field with multiple orders for example here is my table 1st rule is to sort by Status. in following order: Active, Inactive, Merged, Promo A, Promo B, Promo C, Promo D, Defunct Once they are sorted like this within each of these categories the 2nd rule in following Order: Traditional,…

PHP – Uploading multiple files

I’m working on a plugin for wordpress and I want to be able to upload multiple pictures from a form. Right now when I have a form for two pictures and submit it empty, my $_FILES array looks like this: Now the problem is that I want to use wordpress’ upload handler, wp_handle_upload. It expects th…

I need a free php bug tracker [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations. Closed 1 year ago. Improve this quest…