Jump to content

Recommended Posts

define("priority_3","<span class=\"priority_3\">Normal</span>", ture);

should be:

define("Priority_3","<span class=\"priority_3\">Normal</span>", true);

 

then:

 

define("Priority_3","<span class=\"priority_3\">Normal</span>", true);

echo Priority_3;

okay

 

i have the define in my themefile

/images/default/theme.php

 

okay thats all good it will work if called right form a php file in an echo in "words"

 

echo priority_3;

 

BUT

 

I'm trying to pull the words form an $request['priority']; containing the same words!

 

:confused:

 

<?php 

//don't not work
echo $request['priority']; 

//works
echo priority_3; ?>

 

ifs its not possible then nevermind i'll find anther way :)

Do you mean $request['priority'] holds the value 'priority_3' (or priority_2 or priority_1 etc). And you want to call the constand priority_3 (or 2 or 1 etc). You can use the function constant to call a constant

 

For example

 

define("Priority_3","<span class=\"priority_3\">Normal</span>", true);

$request['priority'] = 'Priority_3'; 

echo constant($request['priority']);

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.