|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Another one hehe, about include
Hey guys, another annoying question. I have a name.php file with this content-
<?php $name="nebix"; ?> I want to include it into index.php and have the variable $name with the value nebix available for use. I tried using just an include(name.php); but it doesnt work. Also, a bonus question... How do I remove the last character(a space) from a string? Thank You, help the php n00bs |
|
#2
|
|||
|
|||
|
RE: Another one hehe, about include
White space, use
trim($your_variable); function more info on syntax at http://www.php.net/manual/en/function.trim.php include syntax include ("name.php"); |
|
#3
|
|||
|
|||
|
RE: Another one hehe, about include
include(name.php);
should be: include('name.php'); and use the trim() function to get rid of whitespace http://www.php.net/manual/en/function.trim.php |
|
#4
|
|||
|
|||
|
RE: Another one hehe, about include
hey PC . I left you a note in the mail server forum
|
|
#5
|
|||
|
|||
|
RE: Another one hehe, about include
Quote:
To remove JUST the last character, use: |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > Another one hehe, about include |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|