Reputation: 101
I want to do an echo without having a space, even if I define it with a space.
This is how I defined it:
$closed = 'not yet';
I want it so if I put this (with whatever removes the space):
<?php echo $closed ?>
it will display like "notyet" instead of "not yet"
Upvotes: 1
Views: 3873
Reputation: 13
Just use the . for example:
$closed = 'not' . 'yet';
<?php echo $closed ?>
it will display as "not yet"
Upvotes: 0
Reputation: 219804
Just remove the space with str_replace():
echo str_replace(' ', '', $closed);
Upvotes: 3