473,800 Members | 2,613 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Define, constant, quote, double quotes....drivi ng me crazy! Help!

SM
Hello
i have a constant define like this
define('PHOTOGR APHY', 'images/photography/');

The outpout (html) should look like this:
<img src"images/photography/123.jpg">

How do i insert a constant in an HTML <imgtag. I've try dozens of
combinations with no results.

Here' part of the code
....
<div id="main_image" >
<img src="<?php echo $photo_filename ; ?>" />
</div>
....

thanks

Nov 5 '07 #1
2 2122
SM <se************ *@gmail.comwrot e in news:1194297487 .340586.115990
@v23g2000prn.go oglegroups.com:
Hello
i have a constant define like this
define('PHOTOGR APHY', 'images/photography/');

The outpout (html) should look like this:
<img src"images/photography/123.jpg">

How do i insert a constant in an HTML <imgtag. I've try dozens of
combinations with no results.
Here' part of the code
...
<div id="main_image" >
<img src="<?php echo $photo_filename ; ?>" />
</div>

If you define a constant, you'll certainly need to use it later on, it will
not magically appear.

<img src="<?php echo PHOTOGRAPHY.$ph otofilename; ?>" />

Nov 5 '07 #2
NC
On Nov 5, 1:18 pm, SM <servandomont.. .@gmail.comwrot e:
>
i have a constant define like this
define('PHOTOGR APHY', 'images/photography/');

The outpout (html) should look like this:
<img src"images/photography/123.jpg">
You mean, <img src="images/photography/123.jpg">?
How do i insert a constant in an HTML <imgtag.
<div id="main_image" >
<img src="<?php echo PHOTOGRAPHY, $photo_filename ; ?>" />
</div>

Cheers,
NC

Nov 6 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
6609
by: Fan Zhang | last post by:
Hi group, This is a follow-up of the question I posted this afternoon. I tried to define two constants, PI and radian in that program in the following way, #define PI 3.1415926 #define radian 180./PI I wonder whether they are the same as
1
1160
by: Alex Sanchez. | last post by:
Hi, If I have this : public struct SGPoint { public double X; public double Y; }
12
11759
by: Brett Hofer | last post by:
I must be missing something - Im a veteran C++ programmer now working with C# overall I like the language but find many weird changes... Anyway Im writing code behind an aspx. In this one C# method I am building an XML string to be insterted into a database. This string should result in: <row FIELD1="value1" FIELD2="value2" \> I am using a string type variable and I cannot get the double quotes to be added properly I have tried all of...
6
5717
by: R.Biloti | last post by:
Hi folks I wrote the naive program to show up the unit roundoff (machine precision) for single and double precision: #include <stdio.h> int main (void) { double x;
4
2437
by: Mohammad Omer Nasir | last post by:
I was read Linux kernel code in which I saw few define macro defines in functions. The snap of the function is following and file name "err_ev6.c". static int ev6_parse_cbox(u64 c_addr, u64 c1_syn, u64 c2_syn, u64 c_stat, u64 c_sts, int print) { char *sourcename = { "UNKNOWN", "UNKNOWN", "UNKNOWN", "MEMORY", "BCACHE", "DCACHE",
4
2787
by: venkat | last post by:
I have come across some preprossor statements, such as #define PPTR_int #define PPTR_str #define DDAR_baddr & #define DDAR_caddr & What do they mean, but when i compile the code with these i am not getting any errors .
3
2258
by: anotherjoe | last post by:
Question 1: I have reservation database in access 2007 I have a cabin information table with: cabinid (primarykey) cabinname(text) cabinlocation(text) I have a customer table with: customer id(primary key) last name (text)
8
7473
by: Susan Bricker | last post by:
Hi. I would like to create an array and use the data to populate some new records when the user clicks on a button (that's the short description). If I were to code the array in C (I know ... not this forum, but it's what I know) I would do it like this ... /* Declare the structure template */ struct recdata { long classID;
27
5423
by: pereges | last post by:
I need to define the plancks constant 6.67 X 10 exp -34. Is it possible to do it using #define or would you suggest using a (static ?)const double.
34
2175
by: jacob navia | last post by:
Hi I am adding an optimization to lcc-win: sqrt(2.0) will provoke now that the constant 1.4142... etc will be generated instead of generating an actual call. Details: -------
0
9551
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10507
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10255
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9092
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7582
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6815
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5607
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4150
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3765
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.