0

So far i tried Aptana and CofeeCup an sure, they work fine with autocompleting functions and maby even variables, havent tried them so throughly, but what im about to describe dont work...

Im currently working in NPP (Notepad ++) and iv turned on the variable autocomplete but with that on i can have function complete unless i press ctrl + spacebar. And i havent notised any CSS style completion.

example:

<?php
    $variable = "My text...";
    echo '<html>        <-- Fixing tags for me.
                <head>
                    <style>
                        body {
                            padding: 0px;       <-- Autocomplete CSS inside the styletags within the
                             echo and maby a popup with options like aptana.
                    </style>
                    <script type="text/javascript">
                            alert("lol");       <-- Autocomplete Javascript inside the scripttag within
                    </script>                   <-- the echo maby even jquery.
                </head>
                <body>'.$variable.'             <-- Autocomplete previously used variable names would be
                     good here, ( like NPP ).
                    <div style="width:100%;height200px;" ></div>   <-- And maby even CSS
                </body>                         <-- Autocomplete on "style" atributes.
        </html>'; 
?>

3 Answers 3

1

Take a look at phpstorm

Sign up to request clarification or add additional context in comments.

Comments

0

Write the javascript, css codes outside php, then copy/paste inside php block. The only thing you need to escape are the quotes. Simple.

1 Comment

or something like <?php function myfunction {?> HTML/CSS/Javascript goes here... <?php } ?> and call the function in a php file, but it might still be easier to just use an echo if theres any editor supporting it.
0
<? $variable = "My text..."; ?>
<html>
    <head>
        <style>
            body { padding: 0px; }
        </style>
        <script>
            alert("lol");
        </script>
    </head>
    <body>
        <?= $variable ?>
    </body>
</html>
<? /* the end */ ?>

Code like this - everything autocompletes and stuff. ob_start + likes may help too.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.