/    Sign up×
Community /Pin to ProfileBookmark

echoing a statement

What would be the proper way to echo this line using 1 set of <? ?> instead of 2?

[code=php]
<? echo($user_data[‘startTime’]) “-” ($user_data[‘endTime’]); ?>[/code]

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@comptech520authorMar 02.2006 — I've been playing a little bit, and this is what I have come up with, how Can I keep this inbetween 1 set of <?php ?>

[code=php]
Event Time:</span> <? echo($user_data['startTime']);?> <? echo "- "?> <?echo($user_data['endTime']); ?>
[/code]
Copy linkTweet thisAlerts:
@acemoMar 02.2006 — I've been playing a little bit, and this is what I have come up with, how Can I keep this inbetween 1 set of <?php ?>

[code=php]
Event Time:</span> <? echo($user_data['startTime']);?> <? echo "- "?> <?echo($user_data['endTime']); ?>
[/code]
[/QUOTE]


[code=php]
Event Time:</span>
<?php echo $user_data['startTime'] . "-" . $_user_data['endTime']; ?>
[/code]


try this?
Copy linkTweet thisAlerts:
@NogDogMar 02.2006 — [code=php]
<?php
echo "Event Time: </span>{$user_data['startTime'])} - {$user_data['endTime']}</span>";
?>
[/code]
×

Success!

Help @comptech520 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...