vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Concatenation question (https://vborg.vbsupport.ru/showthread.php?t=113025)

kobescoresagain 04-14-2006 06:08 PM

Concatenation question
 
I am trying to concatenate with a link. I want to take the variable $link which has the string http://www.url.com/ stored within it to that I want to concatenate something.php I want to try to do this inside of a hyperlink. I have tried many things. The following seems to be the closest I have gotten:
<a href=\"$link . \"createproject.php\"\">

But this doesn't work. I have tried quite a few ways, and I understand how to concatenate just strings, but I can't figure this out.

Please help me!!!!
:confused: :confused: :confused: :confused: :confused:

filburt1 04-14-2006 06:18 PM

Provided you've already run $link through htmlspecialchars_uni() for security:
PHP Code:

echo "<a href=\"{$link}createproject.php\">...</a>"

If in a template:
HTML Code:

<a href="{$link}createproject.php">...</a>
Braces force the interpreter to read the contents as a variable.

kobescoresagain 04-14-2006 06:25 PM

awesome, thanks alot. That worked like a charm.


All times are GMT. The time now is 11:51 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00904 seconds
  • Memory Usage 1,714KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete