dynamic table (colons depend on the content of the table)

Hi, this php code shows me the content of a directory on my website:
<?php
$dir = opendir(getcwd());
?>
<body>
<table>
<tbody>
<tr>
<?php
while (($file = readdir($dir)) !== false) {
{
[...]

Stored array into Javascript

I have stored a 2d array in a MySql db
[["c0"]["33925"],["c1"]["39280"],["c2"]["34079"],["c3"]["34091"],["c4"]["34108"]]

I want to convert this into a javascript array.
I am using a php page to get the array
using xmlhttp.responseText;
which gets the array, but I can’t do anything with it;
var layoutArray = new Array();

layoutArray = xmlhttp.responseText;

alert(layoutArray[0][0]);

Am I missing something.
Cheers

PHP website without mysql

I am currently working on an existing website that lists products, there are currently a little over 500 products.
The website has a text file for every product and I want to make a search option, thinking of reading all the text files and create an xml document with the values once a day that [...]

Displaying images from folder in php

Hello I have this code to show image from folder in php :
$handle = opendir(dirname(realpath(__FILE__)).’/galerija/accomodation/’);
while($file = readdir($handle)) {
if($file !== ‘.’ && $file !== ‘..’) {
echo ‘<img src=”galerija/accomodation/’.$file.’” rel=”colorbox” />’;
}
}

and it’s working everthing is fine but how can I set [...]

how to count checked checkboxes in different divs

<head><title>STUDENT WISE EXAM BACKLOGS DISPLAY FOR EXAM REGISTRATION</title>

<style type=”text/css”>
th {
font-family:Arial;
color:black;
border:1px solid #000;
}
thead {
[...]

Form validation error-Call to undefined method CI_Form_validation::set_fields() in php codeigniter

When i try to update the query in php- codeigniter I get this form_validation error. Here is my Controller
THIS gives me error and I am not able to update or add an entry into my database
<?php

class Person extends CI_Controller {

// num of records per page
private $limit = 15;
function Person() {
parent::__construct();

//$this->load->library(‘table’,'form_validation’);
$this->load->library(‘table’);
$this->load->library(‘form_validation’);
$this->form_validation->set_rules();
$this->load->helper(‘url’);

$this->load->model(‘personModel’, ”, TRUE);
}

function index($offset = [...]

I need a better solution for invalidating previous user avatar’s in my app (PHP/MySQL)

Currently I am doing the following to store and invalidate an avatar when a user changes it:

Avatars are stored by userid, split automatically into folders of 1000 each (in order to help the filesystem and avoid having millions of files in each directory)

my function for retrieving a users avatar takes their
userid/sex/version number – if [...]

Fatal error: Call to a member function bindParam() on a non-object in

Can somebody help me to fix my script because I really dont know what is going wrong. It was working fine untill I added multiple languages.
This is my script for selecting and reading my tyres:
<div id=”bloklinks”>
<?php
include_once “class/tekst.class.php”;
[...]

dynamic upload folder for blueimp

I am trying to upload photos via blueimp-jquery upload widget. The file I modified is upload.class.php in “server/php” directory. Here is the code:
<?php

session_start();
class UploadHandler
{
[...]

PHP foreach acting strange

I have an array called $blocks that print_r() function on it will result:
Array ( [0] => template.header [1] => error [2] => emails.addEmail )

and here is my code is:
if(count($blocks)) {
foreach ($blocks as $block) {
echo $block . “\n”;
[...]

Hire Me
Follow Me!
Search
Most Popular Articles & Pages
Because your vote is Important
Sorry, there are no polls available at the moment.
Categories