I need to loop into a multidimensional array in smarty and {section} is giving me a hard time
This is the array called $brands:
Array (26)
A => Array (4)
0 => "Alienation"
1 => "Alligator"
2 => "Amoeba"
3 => "Animal"
B => Array (2)
0 => "Bell"
1 => "Bontrager"
C => Array (9)
0 => "C...
I am converting images using imagemagick from php. I have a directory name that contains ampersand. When I issue a command from php using exec it does not work for the directory that contains ampersand (&) sign. Can anyone help me how to solve this problem? I can't rename the directory.
Thanks
...
I have a PHP file called dynamicxml.php that runs a bunch of code, draws data from a database and creates an XML file. When I right-click and save the link for dynamicxml.php?var=test I need the dialog box to select xml as the default file type and rename the file to var.xml:
header("Content-type: text/xml");
echo '<?xml version="1.0" e...
Hello,
I am beginner in PHP and i read in manual that $_REQUEST is a associative array consisting of cookies, get and post arrays. I want to know which takes precedence in request array.
Say, suppose i have a variable user in $_POST as well as $_COOKIE, and if i use echo $_REQUEST['user'] then which would print. I tried it and i get th...
I'm in the process of theming a node form. I want authenticated users to have as few fields as possible, while I as an administrator want to see all fields. How do I write a php if statement that checks if the current logged in user is an administrator?
...
I found several questions with answers on how to create a video from images. I setup two of them and was able to produce the videos correctly. I tried the following:
ImageMagick
convert -delay 100 -quality 75 photo1.jpg photo2.jpg movie.mpg
FFMPEG
ffmpeg -r 10 -b 1800 -i photo1.jpg photo2.jpg movie.mpg
The end result is the video disp...
I plan to develop web site in PHP using MYSQL ...which applications call for the use of technologies like Ruby-on-Rails , AJAX and Coldfusion. Thx.
...
Hi, I need to count the number of persons with the same status from a table for a specific user.. I want to use prepared statements so I did something like this (not working):
$sql = 'SELECT status, COUNT(personID) FROM user_persons GROUP BY status WHERE userID = ?';
if ($stmt->prepare($sql)) {
$stmt->bind_param('i', $userID);
...
Here's my code
<?php
$host = 'localhost';
$username = 'sam_sam';
$password = '[censored]';
$name = 'sam_ballpointradio';
mysql_connect($host, $db_username, $db_password)
or die(mysql_error());
mysql_select_db($db_name) or die(mysql_error());
?>
and the error message is
Warning: mysql_connect() [function.mysql-connect]: Access deni...
I've followed all the tutorials and uncommented the relevant lines in httpd.conf, but PHP files do not render under Web Sharing.
The server just serves up the source code instead of running it.
I know that PHP works, because I can run it straight from the Terminal using the "php" command.
What is happening here?
...
Scenario: I have a class that extends another class, yet the parent class is undefined (for whatever reason). I am trying to get a ReflectionClass of the child class. When I do this, I get a Class Not Found exception on the parent class. However, I cannot catch this exception. What am I doing wrong?
For example...
<?php
class Foo ...
I want to make a delay when the result comes in the note.
I have a form > input the user types his username in the input and I check with AJAX
if the username is available or not. If yes a note shows up near the input with the
result.
Please no jQuery!
...
hi, i just want to know how to implement autocomplete with multi-language support like Google
i mean what do i have to change in the code and where?
and is there a free php and ajax autocomplete class that support multi-language?
...
say, i have a string like $x="History[424]<"; how to remove the last "<" and make the string $x="History[424]"; ... I tried str_replace and don't know, its not working... :(. Thx in advance
for($k=0;$k<$i;$k++) {
$linklabelmod[$k] = str_replace($linklabel[$k], $linklabel[$k]."[$k]", $linklabel[$k]);
//$var= str_replace($lin...
Possible Duplicates:
Create a webpage with Multilanguage in PHP
PHP - how to translate a website into multiple languages?
I want to make a site which will have 3 languages - e.g. English, Arabic and Italian;
the content sure will be different from one language to another.
Should I make different table for each language, e.g...
hi
i want to know that PHP with Opcode cache is fast or just Facebook Hip-Hop
Thanks
...
Hello,
Been trying to put together an SQL query that sorts data into financial years (which I've sorted) and then SUMs it according to each distinct value in the claim_id column
table structure is: claim(id, claim_id, date, amount)
SQL so far is:
SELECT
CASE
WHEN MONTH(date)>=4 THEN
concat(YEAR(date), '-',YEA...
hey guys
im using a simple function to read my txt file
my txt file content will be like this :
album= Prisoner
info= Description about this singer
and php code :
$Path = 'dewp/pix/info.txt';
$product = parse_ini_file($path);
echo $product['album'];
echo $product['info'];
everything is fine and works good on localhost , but not...
Am having problems with PHP's require_once, require, include_once and include functions not correctly resolving a file. I am running PHP 5.3.1 on Windows Vista with Apache 2.2.11.
These are the problems I am getting:
file_exists('C:/wamp/www/park_factor_network/system/application/shared/config/language.php')
returns TRUE
is_readable...
I will be creating a website soon, and as such I have four projects on the go
(or three if you consider
the first entry as a full project in itself, not two separate sites):
1 & 2 - Internet radio station
3 - TV episode guide with airdates
4 - News site
I will describe each of them, and how I intend to use them:
Project 1 & 2
The ...