Hi there,
I'm new in php coding so I need little help.
I need to find way to create table trough php code but with name of table from string. How to write that correct
here is example of my needs
$query ='CREATE TABLE $table_name (
`id` INT( 11 ) NOT NULL AUTO_INCREMENT,
`vis_name` VARCHAR( 50 ) NOT NULL,
`vis_key` VARCHAR( 50 ) NOT NULL,
`date` DATETIME NOT NULL,
PRIMARY KEY ( `id` )
)';
Thank you in advance
Help with string
Moderator: General Moderators
Re: Help with string
Variables aren't parsed inside single quotes. Use double quotes and the code you posted should work fine.