How do you strip quotes out of an ECHO’ed string in a Windows batch file?

The call command has this functionality built in. To quote the help for call: Substitution of batch parameters (%n) has been enhanced. You can now use the following optional syntax: %~1 – expands %1 removing any surrounding quotes (“) Here is a primitive example: @echo off setlocal set mystring=”this is some quoted text” echo mystring=%mystring% … Read more

echo -e equivalent in Windows?

There is no equivalent, but you can write your own function. I would split the problem into two parts. Convert the hex number to decimal. Convert the decimal number to ASCII. Converting from hex to decimal is simple by set “myHex=4A” set /a decimal=0x%myHex% Converting a number to an ASCII is more tricky, it depends … Read more

How to use css style in php

I guess you have your css code in a database & you want to render a php file as a CSS. If that is the case… In your html page: <html> <head> <!- head elements (Meta, title, etc) –> <!– Link your php/css file –> <link rel=”stylesheet” href=”https://stackoverflow.com/questions/13201451/style.php” media=”screen”> <head> Then, within style.php file: <?php … Read more

How does one output bold text in Bash?

The most compatible way of doing this is using tput to discover the right sequences to send to the terminal: bold=$(tput bold) normal=$(tput sgr0) then you can use the variables $bold and $normal to format things: echo “this is ${bold}bold${normal} but this isn’t” gives this is bold but this isn’t

PHP printed boolean value is empty, why?

Be careful when you convert back and forth with boolean, the manual says: A boolean TRUE value is converted to the string “1”. Boolean FALSE is converted to “” (the empty string). This allows conversion back and forth between boolean and string values. So you need to do a: echo (int)$local_rates_file_exists.”<br>”;