How to determine the RESULTS field in table users, base on USER SCORE field with the provisions of the value closest to SCORE BRAND field. This is table Brand <table> <tr> <th>BRAND NAME</th> <th>SCORE BRAND</th> </t
I want to update my table using bootstrap dialog , but I when I retrieve my datatable from server side and embed php code into my modal to show the table data into the modal, and choose what the user wants to update in that form. it is showing the da
I created a custom module to create a block programmatically and show country list. It uses custom template file. I passed the country list array to the template file. Issue is how do I show each country using foreach inside the template file. My cod
I made sure the env module was installed: a2enmod Your choices are: access_compat ... Which module(s) do you want to enable (wildcards ok)? env Module env already enabled I tried setting an environmental variable in "/etc/apache2/apache2.conf" f
I am retrieving record from mysql table which return more than 0.2m number of rows per query, which obviously take lot of memory. in my case i have 8 GBs installed RAM on my system with SSD 256 GBs. When i execute my page it returns the following err
I have following $data array Array ( [0] => Array ( [match_day] => MD27 [price] => 95.33 ) [1] => Array ( [match_day] => MD28 [price] => 97.82 ) [2] => Array ( [match_day] => MD29 [price] => ) [3] => Array ( [match_day] =>
I'm trying to make a "API" for a website which I don't own, and trying to scrape information off pages, however I've tried suggestions on stackoverflow and other locations about DOM and regex, which usually require a context or specific div id t
I am a starter in PHP language. I was trying to develop a small application. For that (lets say, page 1) I was posting some data to a PHP file from the page 1 through an Ajax call.Then I want to access the same value from that PHP file in another HTM
I am having trouble thinking out a good way to update my query depending on user $_POST values. Basically I have user management search button, where site administrator can search for his sites users. In my example: <div id="website_user_managemen
I have foreach cycle in PHP. It is going trough json items, and for every item I have value that changes. I set my cycle to run every 20min. I need my value to be saved and next time foreach runs for that item I need to assign at the beginning old va
I wanted to learn laravel framework. I could install laravel in my webserver(Wamp) and i get some tutorial to learn it but when i tryed to add style to 'h1' tag in the hello.php file place in this path:("C:\wamp\www\laravel-master\app\views\hello.php
I wanted to split a large text into 10 pieces (somehow equal parts). Ii use this function: <?php function chunk($msg) { $msg = preg_replace('/[\r\n]+/', ' ', $msg); //define character length of each text piece $chunks = wordwrap($msg, 10000, '\n'); r
i was to the topmenu.phtml to edit the topmenu magento, but the code found: <?php $_menu = $this->getHtml('level-top') ?> <?php if($_menu): ?> <div class="nav-container"> <ul id="nav"> <?php echo $_menu ?&
My question is the following: Is there a string function that returns a count of occurrences, like substr_count(), but with a limiting option? I want to count the occurrences of 'a' in a string, but before the first newline.You can use substr() with
I know the title is messed up, but basically I have: news.php which is kind of a dashboard where I get all news from DB and I can perform actions on them (update, delete, insert new) and also I display them in a traditional way (tables). The problem
I have the following array: Array ( [0] => Array ( [word] => 1 [question] => php [position] => 11 ) [1] => Array ( [word] => sql [question] => 1 [position] => 22 ) ) I need to find if [position] => 22 exists in my array and reta
The PHP manual states It is not possible to use $this from anonymous function before PHP 5.4.0 on the anonymous functions page. But I have found I can make it work by assigning $this to a variable and passing the variable to a use statement at the fu
I'm trying to build a custom search form using PHP and I'm looking for a way to append a parameter to the end of the URL (based on a selection from a selection box), upon form submission. Say I have a selection box with these values: Red Blue Green I
I have an AS3 project that takes user inputs (basically like a multiple choice test) and saves the these inputs in an array. I need to save the array to a text file so it can be reloaded when the app is reloaded. When the user returns to the applicat
Building a WordPress options panel. One of the things it does is allow users to pick custom colors. I use a default stylesheet, then call styles for custom inputs. However, I simply insert this in the header instead of having these custom values resi
Hello and Good Morning, I am still learning PHP and for some reason my script will not post any data in my foreach loop. Any Idea why? The emailRow Echos out fine but I am going to remove My code is below: <?php include 'includes/header.php'; $accoun
I am trying to create a list of links that would make up the elements of a form (will be used as a search feature). Basically, each link in the list represents a search category, so as users click on a link, their search results will be filtered. I w
I dont know whether it is right to post it over here. Can someones suggest some beginner resources for this topic. Thanks in advance.I found Added Bytes' Writing Secure PHP a good guide when I was starting out with PHP.
What do you use? What are the benefits of using it? Gimme the lowdown on all the techniques, pros and cons all the tutorials don't tell you about.The short answer is: you don't. What you actually store is the result of running the user's password thr
I have a php page that uses php sessions as well as jquery to call pages via ajax. The problem is if the page is idle for so long the page being called via ajax gets redirected to the home page but the rest of the page outside the div being updated w
I have a big validation JS script. I want to put this script to be external JS. Everything works fine with this, but in the JS i use cookie to handle the my user form junctions. And besides, i use PHP in this JS. If the JS in the html, then works. Bu
I'm trying to get twitter statuses displaying on my blog, however I cannot get the time each status is created at to display the way in which I desire. Here is how it is being printed now: Thu Aug 05 12:36:20 +0000 2010 However I would like it to be
This is my array: $arr = array(-3, -4, 1, -1, 2, 4, -2, 3); I want to sort it like this: 1 2 3 4 -1 -2 -3 -4 So first there would be values greated than zero sorted from the lowest value to the highest value, then there would be negative values sorte
Is there a CMS built on Zend Framework? As alternative, are there classes that allow to easier implement a CMS with Zend Framework? If there are any CMSs, can you suggest which one is better, or which one you would use?Although you've already accepte
I have three strings: $str1 = "abc"; $str2 = "def"; $str3 = "ghi"; I can get the value of all of them like this: echo "$str1$str2$str3"; But I heard there is a way to join them together, so I can echo all of them wi